Commit Graph

22 Commits

Author SHA1 Message Date
David Vollbracht
117d17c83e Adds guide for adding Orville to an existing reader context 2023-12-20 08:08:59 -06:00
David Vollbracht
16c6ecad11 Adds guide for how to add Orville your application stack 2023-12-19 14:47:35 -06:00
David Vollbracht
e9ad7d1086 Adds prototype docsite with existing tutorials. 2023-11-06 16:54:22 -06:00
Paul Burns
fb7d143c91
Update GHC versions that we test and support
Drops support for GHC 8.8 and drops support for all but the latest versions
of GHC 8.10, 9.0, and 9.2. Adds support for GHC 9.4.5 and 9.6.2.
2023-07-10 08:27:31 -04:00
David Vollbracht
059eaf3305 Organizes the Monad-related modules
I split `HasOrvilleState` to its own file because putting `OrvilleState`
in with the monad things didn't really feel right. Instead I simply put
it directly under `Orville.PostgreSQL`.
2023-03-30 15:38:14 -05:00
Trevis Elser
a7f24eb0da Update compiler versions tested against.
Adds ghc-8.10.6 and 8.10.7 as tested compiler versions.
Also updates our nightly check for ghc 9.0.1.

Something of note: a change in the way happy is built means that it
now requires itself to build. This will cause builds to fail for us as
the build tools do not solve for this. To work around it I've included
installing a version of happy from the package manager which allows
the transitive dep of happy to build.
2021-10-24 17:30:22 -04:00
Trevis Elser
a0c2770d38 Formats the LibPQ codebase with fourmolu
Running the formatter is scripted and depends only on POSIX, `stack`(to install fourmolu), and the `-P` extension to xargs which seems reasonably available and is used to run formatting in parallel.
For example it can run done with `docker-compose run --rm dev sh -c ./scripts/format-repo.sh`.

Some more details:
- Adds a fourmolu configuration file.
- Adds helper script for running the fourmolu during development (that will format all the .hs files found)
- Adds a CI job to check that formatting was done, which can be expanded for more tooling later if desired
  - This also uses a helper script, both placed in a orville-postgresql-libpq/scripts directory
- Adds a docker-compose file for running tools in CI and caching the build of them as the build of fourmolu was otherwise taking >2x the runtime of the other jobs
- Runs the formatting on the entire LibPQ codebase.
2021-06-12 21:59:01 -04:00
Trevis Elser
5d95f82b65 LibPQ: Adds OrderBy to Expr
Adds `OrderByClause` to Expr. This exposes again how easy it is to add new bits of SQL in our current modeling.
But `OrderBy` is, in pure SQL, allowed to have a very wide range of things in it.
To that end this level of abstraction is quite unsafe and potentially invalid SQL is possible.
Creating documentation for the Expr module in general deserves some thought.

The tests have some shared helper functions with the `WhereClause` copied in anticipation of the `Expr` module being broken up and the pieces tested individually.

Left for future work is the handling of NULL first or last, though I suspect that is a relatively straightforward addition.

Also touches up a few minor things:
- Bases off a dockerfile with the latest and greatest stack and debiann
- Adds a stack.yaml file which is a link to the LTS-17.3 specific one
  This makes some tooling which looks for a stack.yaml file a bit easier to work with
- Updates the docker-compose.yml to use the stack.yaml file so we can swap the link as desired without changing the compose file.
- Updates the gitignore to ignore TAGS at the top level instead of only in a directory
2021-05-27 15:01:04 -04:00
Trevis Elser
60c765ddf5 Adds a very basic circle-ci config for libpq tests
- Adds a stack-lts-17 config
- Tweaks the docker-compose.yml to use the latest patch of postgresql 9.6
- Updates Dockerfile to base on a version with stack 2.5 instead of the old 1.9
- Adds a very basic circle config that runs the tests
2021-05-02 21:22:00 -04:00
Trevis
cfd384baa9 Adds instructions, changes, and files needed to for setting up Oracle development locally. 2019-08-30 16:17:01 -04:00
Trevis
905e4f6d12 Changes for working with Oracle's sql types.
- Adds field definitions for working with Oracle's NUMBER type which can be either Integers or Doubles.
- "Int" columns come back as bytestrings, so a, sadly hacky*, workaround is in place.
- Both "DATE" and "TIMESTAMP" in Oracle correspond to a LocalTime (use with localTimeField).
  Perhaps some aliases would be helpful? (eg dateField and/or timestampField pointing to localTimeField)

Notablely some things do not seem to work yet:
- insertRecord fails with "Function sequence error", the statement preparation/execution is a candidate for further investigation
- migrateSchema causes Oracle to spin indefinitely.
  There are still some pg specifics to replace (listing constraints/indexes), but avoiding those still causes the CPU to sit at 100% with no end in sight
- selectFirst still has some sql incompatability

* This uses read to get the bytestrings back to ints :( suggestions on better ways to handle this welcome
2019-08-12 12:31:36 -04:00
Trevis
e3f243e2b3 Step 1 in unifying PostgreSQL and Oracle DB support.
This creates "orville-postgresql" as a folder containing a library (called "orville-postgresql")
which is home to the previously named "orville" code. It also fixes flipstone/orville#60 in the process.

Follow on work will be to add "orville-oracle" as a sibling to "orville-postgresql".
2019-08-06 10:27:06 -04:00
David Vollbracht
eababf512d Adds test-all script
This script will run compile and run the tests against all the
stack*.yml files that are found in the root of the repo, reporting
whether each one passed or failed.

It is generally useful for doing a final check before pushing, rather
then as the regular edit/compile/test loop to get feedback during
development.
2018-11-29 13:26:29 -05:00
David Vollbracht
19e6c8c0de Removes orville.cabal from .gitignore
The file would actually be required if anyone were trying to build using cabal
instead of stack. Really should not have been ignored in the first place.
2018-11-05 14:04:43 -05:00
David Vollbracht
b5fa5b78c7 Merge branch 'qxjit/ch12060/spike-design-to-support-different-insert' into 0.9_development 2018-05-22 18:14:34 -04:00
David Vollbracht
1a185674a7 Moves stack work to a volume for local dev. 2018-05-16 13:16:28 -04:00
David Vollbracht
c3a46c9b86 Converts orville.cabal into package.yaml 2018-03-23 08:46:51 -04:00
David Vollbracht
0285352d01 Switches local development to use flipstone/stack:v1-1.6.5 image
docker-compose will create a volume for stack-root dedicated to orville.
You can add a `docker-compose.override.yml` and override the volume
mounted on `/stack-root` if you want your local development to use an
external volume for `/stack-root`.
2018-03-23 08:34:53 -04:00
(cdep)illabout
5d888a3d51 Add TAGS file to .gitignore. 2017-08-21 18:40:02 +09:00
(cdep)illabout
ec617d051a Add .stack file to make it easier to build with stack. 2017-08-21 14:53:09 +09:00
Ed Browne
cd4afd3821 Adds mac osx .DS_Store 2017-02-10 10:27:41 -06:00
David Vollbracht
a68f7c482a Initial commit 2016-03-28 19:21:24 +00:00