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
commit89be6e97ad713323aaf23f866a7fe08303e7180f (patch)
tree29698fd52bc17d2863f259f785f28699e1e20418 /tests/timestamp.ur
parent9d38076e9a1dc49faec13596a2f707269c2a0ad7 (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 :: [])})
+