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
commit29212f13093acce8e7d10dbb135b2065893bc9fd (patch)
tree40d3f3abaf19f69f1039b4eb6e5fc2d4cb0744ff /tests
parentc9187effa33aa0e68eda9bef752e3ec8a5a2e5d3 (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