Mercurial > urweb
view tests/cst.ur @ 704:70cbdcf5989b
UNIQUE constraints
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 07 Apr 2009 12:24:31 -0400 |
parents | |
children | e6706a1df013 |
line wrap: on
line source
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/>