summaryrefslogtreecommitdiff
path: root/tests/timestamp.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-11-30 09:50:00 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-11-30 09:50:00 -0500
commitb8fccedd9c01c3b499f64c26506c8fb4ea8b4109 (patch)
tree29698fd52bc17d2863f259f785f28699e1e20418 /tests/timestamp.ur
parent01c379cbff1dd59486da18916a49530ea0dd4f87 (diff)
Fix generation of timestamp literals for MySQL and SQLite
Diffstat (limited to 'tests/timestamp.ur')
-rw-r--r--tests/timestamp.ur11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/timestamp.ur b/tests/timestamp.ur
new file mode 100644
index 00000000..56f030ed
--- /dev/null
+++ b/tests/timestamp.ur
@@ -0,0 +1,11 @@
+table t : { A : time }
+
+fun many ls =
+ case ls of
+ [] => (WHERE TRUE)
+ | tm :: ls' => (WHERE t.A = {[tm]} AND {many ls'})
+
+task initialize = fn () =>
+ tm <- now;
+ dml (DELETE FROM t WHERE {many (tm :: [])})
+