From e9b71baa2477fda7f38e6cbabad121e8e3c2c49c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 4 Nov 2013 16:00:48 -0500 Subject: A fancier test for the new SQL constraints subtyping --- tests/consub.ur | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/consub.ur (limited to 'tests/consub.ur') 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) -- cgit v1.2.3