Skip to content

Commit a23cd82

Browse files
abigailaliceKaneTW
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 9580b6f commit a23cd82

File tree

4 files changed

+1111
-7
lines changed

4 files changed

+1111
-7
lines changed

rel8.cabal

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ library
2929
, bytestring
3030
, case-insensitive
3131
, comonad
32+
, containers
3233
, contravariant
3334
, data-textual
3435
, hasql ^>= 1.6.1.2
@@ -65,6 +66,7 @@ library
6566
Rel8.Expr.Num
6667
Rel8.Expr.Text
6768
Rel8.Expr.Time
69+
Rel8.Table.Verify
6870
Rel8.Tabulate
6971

7072
other-modules:
@@ -238,7 +240,8 @@ library
238240
test-suite tests
239241
type: exitcode-stdio-1.0
240242
build-depends:
241-
base
243+
aeson
244+
, base
242245
, bytestring
243246
, case-insensitive
244247
, containers
@@ -253,10 +256,12 @@ test-suite tests
253256
, tasty
254257
, tasty-hedgehog
255258
, text
259+
, these
256260
, time
257261
, tmp-postgres ^>=1.34.1.0
258262
, transformers
259263
, uuid
264+
, vector
260265

261266
other-modules:
262267
Rel8.Generic.Rel8able.Test

0 commit comments

Comments
 (0)