summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-30 14:57:15 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-30 14:57:15 -0400
commitbca91774855a83f677f1a53abd3081258dc3a95c (patch)
tree40d3f3abaf19f69f1039b4eb6e5fc2d4cb0744ff /tests
parent49330740529a9d1448bff0fd3123e8946ab3915d (diff)
Reading timestamps from SQL
Diffstat (limited to 'tests')
-rw-r--r--tests/time.ur10
-rw-r--r--tests/time.urp2
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/time.ur b/tests/time.ur
index 7b8b93ef..f6093dd3 100644
--- a/tests/time.ur
+++ b/tests/time.ur
@@ -1,4 +1,12 @@
+table t : { Id : int, Time : time }
+
val now : time = readError "10/30/08 14:35:42"
val later : time = readError "10/30/08 14:37:42"
-fun main () = return <xml>{[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]}</xml>
+fun main () =
+ xml <- queryX (SELECT * FROM t)
+ (fn r => <xml>{[r.T.Id]}: {[r.T.Time]}<br/></xml>);
+ return <xml><body>
+ {xml}
+ {[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]}
+ </body></xml>
diff --git a/tests/time.urp b/tests/time.urp
index f48698e9..bfa87a0a 100644
--- a/tests/time.urp
+++ b/tests/time.urp
@@ -1,3 +1,5 @@
debug
+database dbname=time
+sql time.sql
time