summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-12-20 13:22:44 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2010-12-20 13:22:44 -0500
commit5c17ca9d7f867c45144600ec7e6e7af0134191d7 (patch)
tree021c30b2de4116401239e0dd59f0844a99e92e07 /tests
parent5f3771069b5e4c7e99b1c1bbe98de2e8e7b96161 (diff)
Use proper string time format for SQLite
Diffstat (limited to 'tests')
-rw-r--r--tests/sqliteTime.ur14
-rw-r--r--tests/sqliteTime.urp5
-rw-r--r--tests/sqliteTime.urs1
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/sqliteTime.ur b/tests/sqliteTime.ur
new file mode 100644
index 00000000..427b5e0f
--- /dev/null
+++ b/tests/sqliteTime.ur
@@ -0,0 +1,14 @@
+table dates : { Date : time }
+
+fun aform () =
+ let
+ val a : time = readError "01/02/03 04:06:07"
+ in
+ dml(INSERT INTO dates (Date) VALUES ({[a]}));
+ ds <- queryX (SELECT * FROM dates)
+ (fn r => <xml>{[r.Dates.Date]}<br/></xml>);
+ return <xml><body>{ds}</body></xml>
+ end
+
+fun main () =
+ return <xml><body><form><submit action={aform}/></form></body></xml>
diff --git a/tests/sqliteTime.urp b/tests/sqliteTime.urp
new file mode 100644
index 00000000..9275bf48
--- /dev/null
+++ b/tests/sqliteTime.urp
@@ -0,0 +1,5 @@
+dbms sqlite
+database /tmp/test
+sql sqliteTime.sql
+
+sqliteTime
diff --git a/tests/sqliteTime.urs b/tests/sqliteTime.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/sqliteTime.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page