summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-11-04 16:00:48 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-11-04 16:00:48 -0500
commite9b71baa2477fda7f38e6cbabad121e8e3c2c49c (patch)
tree02e9fe94d53d44b645dd88a2cf10680bb16213a8 /tests
parentf78c57eee6a26977b329a7e2d452d17a9e91ac41 (diff)
A fancier test for the new SQL constraints subtyping
Diffstat (limited to 'tests')
-rw-r--r--tests/consub.ur16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/consub.ur b/tests/consub.ur
new file mode 100644
index 00000000..4656e335
--- /dev/null
+++ b/tests/consub.ur
@@ -0,0 +1,16 @@
+functor F(M : sig
+ table t : { A : int, B : int }
+ PRIMARY KEY A
+ end) = struct
+ open M
+
+ fun getByA a = oneRow1 (SELECT * FROM t WHERE t.A = {[a]})
+end
+
+table u : { A : int, B : int }
+ PRIMARY KEY A,
+ CONSTRAINT B UNIQUE B
+
+open F(struct
+ val t = u
+ end)