Skip to content

Commit 9d3fefd

Browse files
abigailaliceKaneTW
authored andcommitted
Implement schema typechecker
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]>
1 parent 2a38a0d commit 9d3fefd

File tree

4 files changed

+1104
-6
lines changed

4 files changed

+1104
-6
lines changed

rel8.cabal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ library
2828
, bytestring
2929
, case-insensitive
3030
, comonad
31+
, containers
3132
, contravariant
3233
, hasql >= 1.8 && < 1.10
3334
, iproute ^>= 1.7
@@ -69,6 +70,7 @@ library
6970
Rel8.Expr.Num
7071
Rel8.Expr.Text
7172
Rel8.Expr.Time
73+
Rel8.Table.Verify
7274
Rel8.Tabulate
7375

7476
other-modules:
@@ -264,6 +266,7 @@ test-suite tests
264266
, tasty
265267
, tasty-hedgehog
266268
, text
269+
, these
267270
, time
268271
, tmp-postgres ^>=1.34.1.0
269272
, transformers

0 commit comments

Comments
 (0)