Skip to content

Commit

Permalink
Implement schema typechecker
Browse files Browse the repository at this point in the history
This closes #274 and #186, allowing the generation of CREATE TABLE
statements from a TableSchema, as well as checking a TableSchema against
a database to determine if the tables are defined correctly in the
database to be read from/written to by rel8.

It also adds tests for the creation and type checking of tables, to
ensure they succeed/fail in appropriate cases.

Co-authored-by: David Kraeutmann <[email protected]>
  • Loading branch information
abigailalice and KaneTW committed Aug 12, 2024
1 parent 9580b6f commit a23cd82
Show file tree
Hide file tree
Showing 4 changed files with 1,111 additions and 7 deletions.
7 changes: 6 additions & 1 deletion rel8.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ library
, bytestring
, case-insensitive
, comonad
, containers
, contravariant
, data-textual
, hasql ^>= 1.6.1.2
Expand Down Expand Up @@ -65,6 +66,7 @@ library
Rel8.Expr.Num
Rel8.Expr.Text
Rel8.Expr.Time
Rel8.Table.Verify
Rel8.Tabulate

other-modules:
Expand Down Expand Up @@ -238,7 +240,8 @@ library
test-suite tests
type: exitcode-stdio-1.0
build-depends:
base
aeson
, base
, bytestring
, case-insensitive
, containers
Expand All @@ -253,10 +256,12 @@ test-suite tests
, tasty
, tasty-hedgehog
, text
, these
, time
, tmp-postgres ^>=1.34.1.0
, transformers
, uuid
, vector

other-modules:
Rel8.Generic.Rel8able.Test
Expand Down
Loading

0 comments on commit a23cd82

Please sign in to comment.