view tests/consub.ur @ 1933:8e6e3d9cea22

RAND_bytes isn't thread-safe, so wrap it with a lock
author Adam Chlipala <adam@chlipala.net>
date Wed, 11 Dec 2013 18:54:42 -0500
parents 2e6795cc992f
children
line wrap: on
line source
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)