adamc@438: table t : { Id : int, Time : time }
adamc@438:
adamc@436: val now : time = readError "10/30/08 14:35:42"
adamc@437: val later : time = readError "10/30/08 14:37:42"
adamc@436:
adamc@438: fun main () =
adamc@439: dml (INSERT INTO t (Id, Time) VALUES (42, {now}));
adamc@438: xml <- queryX (SELECT * FROM t)
adamc@438: (fn r => {[r.T.Id]}: {[r.T.Time]}
);
adamc@441: minMax <- oneRow (SELECT CURRENT_TIMESTAMP AS Cur, MIN(t.Time) AS Min, MAX(t.Time) AS Max FROM t);
adamc@438: return
adamc@438: {xml}
adamc@440: {[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]}
adamc@441: {[minMax.Cur]}, {[minMax.Min]}, {[minMax.Max]}
adamc@438: