diff options
author | Adam Chlipala <adam@chlipala.net> | 2010-12-20 13:22:44 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2010-12-20 13:22:44 -0500 |
commit | 5c17ca9d7f867c45144600ec7e6e7af0134191d7 (patch) | |
tree | 021c30b2de4116401239e0dd59f0844a99e92e07 /tests | |
parent | 5f3771069b5e4c7e99b1c1bbe98de2e8e7b96161 (diff) |
Use proper string time format for SQLite
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sqliteTime.ur | 14 | ||||
-rw-r--r-- | tests/sqliteTime.urp | 5 | ||||
-rw-r--r-- | tests/sqliteTime.urs | 1 |
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 |