adamc@253: table t1 : {A : int, B : string, C : float, D : bool} adamc@243: table t2 : {A : float, D : int} adamc@243: adamc@243: datatype list a = Nil | Cons of a * list a adamc@243: adamc@253: (*val q1 = (SELECT * FROM t1)*) adamc@253: val q1 = (SELECT * FROM t1 WHERE t1.A = 0) adamc@253: adamc@253: val r1 : transaction (list {A : int, B : string, C : float, D : bool}) = adamc@243: query q1 adamc@251: (fn fs acc => return (Cons (fs.T1, acc))) adamc@243: Nil adamc@243: adamc@249: val r2 : transaction string = adamc@243: ls <- r1; adamc@243: return (case ls of adamc@249: Nil => "Problem" adamc@249: | Cons ({B = b, ...}, _) => b) adamc@249: adamc@249: val main : unit -> transaction page = fn () => adamc@249: s <- r2; adamc@249: return adamc@249: {cdata s} adamc@249: