diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-07 14:11:32 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-07 14:11:32 -0400 |
commit | fd1a963a81327f7b6a20a0f2ac131d2525649400 (patch) | |
tree | 053aee5bbd985b79f0d1901bc4fb72a44d48c4aa /tests | |
parent | e52d6c0bc6e2e911515d21c6acc1e311a8e30db9 (diff) |
Track uniqueness sets in table types
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cst.ur | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/cst.ur b/tests/cst.ur index 104a9f34..0ebcc977 100644 --- a/tests/cst.ur +++ b/tests/cst.ur @@ -4,9 +4,12 @@ table t : {A : int, B : int} CONSTRAINT UniBoth UNIQUE (A, B), CONSTRAINT UniAm UNIQUE {#A}, - CONSTRAINT UniAm2 UNIQUE {{[A = _]}}, - CONSTRAINT UniAm3 {unique [[A = _]] !}, - {{one_constraint [#UniAm4] (unique [[A = _]] !)}} + CONSTRAINT UniAm2 {unique [#A] [[]] ! !}, + {{one_constraint [#UniAm3] (unique [#A] [[]] ! !)}}, + + CONSTRAINT UniBothm UNIQUE ({#A}, {#B}), + CONSTRAINT UniBothm2 {unique [#A] [[B = _]] ! !}, + {{one_constraint [#UniBothm3] (unique [#A] [[B = _]] ! !)}} fun main () : transaction page = queryI (SELECT * FROM t) (fn _ => return ()); |