diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-10-30 15:16:37 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-10-30 15:16:37 -0400 |
commit | 7e90e2dd45c936519b6397a3ac9f8cb481ea6511 (patch) | |
tree | fe9ae1798baecaadf006b54d792997b0fb2db54c /tests/time.ur | |
parent | 5421d219d4b51b4b8ef18524d5b7db5c4939c36d (diff) |
Time MIN/MAX
Diffstat (limited to 'tests/time.ur')
-rw-r--r-- | tests/time.ur | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/time.ur b/tests/time.ur index f66004a5..f81c59c3 100644 --- a/tests/time.ur +++ b/tests/time.ur @@ -7,7 +7,9 @@ fun main () = dml (INSERT INTO t (Id, Time) VALUES (42, {now})); xml <- queryX (SELECT * FROM t) (fn r => <xml>{[r.T.Id]}: {[r.T.Time]}<br/></xml>); + minMax <- oneRow (SELECT MIN(t.Time) AS Min, MAX(t.Time) AS Max FROM t); return <xml><body> {xml} - {[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]} + {[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]}<br/> + {[minMax.Min]}, {[minMax.Max]} </body></xml> |