comparison tests/query.ur @ 254:f8d9395575ec

Monoized binary operators
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 14:33:22 -0400
parents 7f6620853c36
children 5f9b9972e6b8
comparison
equal deleted inserted replaced
253:7f6620853c36 254:f8d9395575ec
1 table t1 : {A : int, B : string, C : float, D : bool} 1 table t1 : {A : int, B : string, C : float, D : bool}
2 table t2 : {A : float, D : int} 2 table t2 : {A : float, D : int}
3 3
4 datatype list a = Nil | Cons of a * list a 4 datatype list a = Nil | Cons of a * list a
5 5
6 (*val q1 = (SELECT * FROM t1)*) 6 val q1 = (SELECT * FROM t1)
7 val q1 = (SELECT * FROM t1 WHERE t1.A = 0)
8 7
9 val r1 : transaction (list {A : int, B : string, C : float, D : bool}) = 8 val r1 : transaction (list {A : int, B : string, C : float, D : bool}) =
10 query q1 9 query q1
11 (fn fs acc => return (Cons (fs.T1, acc))) 10 (fn fs acc => return (Cons (fs.T1, acc)))
12 Nil 11 Nil