summaryrefslogtreecommitdiff
path: root/tests/cst.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 12:24:31 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 12:24:31 -0400
commitb872b8f181d7f5d1917dc0e4802f8741c976215d (patch)
treeb422a6ade536f96b318a9d9547f2f2c95562691a /tests/cst.ur
parent84bbd76f640d3e7718c090e229bb05d5f5e49eac (diff)
UNIQUE constraints
Diffstat (limited to 'tests/cst.ur')
-rw-r--r--tests/cst.ur13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cst.ur b/tests/cst.ur
new file mode 100644
index 00000000..104a9f34
--- /dev/null
+++ b/tests/cst.ur
@@ -0,0 +1,13 @@
+table t : {A : int, B : int}
+ CONSTRAINT UniA UNIQUE A,
+ CONSTRAINT UniB UNIQUE B,
+ CONSTRAINT UniBoth UNIQUE (A, B),
+
+ CONSTRAINT UniAm UNIQUE {#A},
+ CONSTRAINT UniAm2 UNIQUE {{[A = _]}},
+ CONSTRAINT UniAm3 {unique [[A = _]] !},
+ {{one_constraint [#UniAm4] (unique [[A = _]] !)}}
+
+fun main () : transaction page =
+ queryI (SELECT * FROM t) (fn _ => return ());
+ return <xml/>