comparison tests/consub.ur @ 1887:2e6795cc992f

A fancier test for the new SQL constraints subtyping
author Adam Chlipala <adam@chlipala.net>
date Mon, 04 Nov 2013 16:00:48 -0500
parents
children
comparison
equal deleted inserted replaced
1886:b7cd3c7c7edd 1887:2e6795cc992f
1 functor F(M : sig
2 table t : { A : int, B : int }
3 PRIMARY KEY A
4 end) = struct
5 open M
6
7 fun getByA a = oneRow1 (SELECT * FROM t WHERE t.A = {[a]})
8 end
9
10 table u : { A : int, B : int }
11 PRIMARY KEY A,
12 CONSTRAINT B UNIQUE B
13
14 open F(struct
15 val t = u
16 end)