diff options
author | 2009-04-07 12:24:31 -0400 | |
---|---|---|
committer | 2009-04-07 12:24:31 -0400 | |
commit | b872b8f181d7f5d1917dc0e4802f8741c976215d (patch) | |
tree | b422a6ade536f96b318a9d9547f2f2c95562691a /tests | |
parent | 84bbd76f640d3e7718c090e229bb05d5f5e49eac (diff) |
UNIQUE constraints
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cst.ur | 13 | ||||
-rw-r--r-- | tests/cst.urp | 5 |
2 files changed, 18 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/> diff --git a/tests/cst.urp b/tests/cst.urp new file mode 100644 index 00000000..b9deaa44 --- /dev/null +++ b/tests/cst.urp @@ -0,0 +1,5 @@ +debug +database dbname=cst +sql cst.sql + +cst |