summaryrefslogtreecommitdiff
path: root/tests/consub.ur
blob: 4656e3357ff3b80059aecff1f6d1d1a3384a2eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
functor F(M : sig
              table t : { A : int, B : int }
                PRIMARY KEY A
          end) = struct
    open M

    fun getByA a = oneRow1 (SELECT * FROM t WHERE t.A = {[a]})
end

table u : { A : int, B : int }
  PRIMARY KEY A,
  CONSTRAINT B UNIQUE B

open F(struct
           val t = u
       end)