diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-07-18 10:27:32 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-07-18 10:27:32 -0400 |
commit | fdca372b5e04a3f460fb3a635076b0fb81a492e7 (patch) | |
tree | a26160e55fe25f54defba930744c0345a4ddf7a9 /tests | |
parent | 28caa2aa78f1dbfd7119ec742da0181f8863c6fa (diff) |
Blobs tested in MySQL and SQLite
Diffstat (limited to 'tests')
-rw-r--r-- | tests/blob.ur | 4 | ||||
-rw-r--r-- | tests/blob.urp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/blob.ur b/tests/blob.ur index 4c368a86..c6106686 100644 --- a/tests/blob.ur +++ b/tests/blob.ur @@ -1,7 +1,7 @@ sequence s table t : { Id : int, Nam : option string, Data : blob, Desc : string, Typ : string } -fun view id = +fun see id = r <- oneRow (SELECT t.Data, t.Typ FROM t WHERE t.Id = {[id]}); returnBlob r.T.Data (blessMime r.T.Typ) @@ -13,7 +13,7 @@ fun save r = and main () = ls <- queryX (SELECT t.Id, t.Desc, octet_length(t.Data) AS Len FROM t ORDER BY t.Desc) - (fn r => <xml><li><a link={view r.T.Id}>{[r.T.Desc]} ({[r.Len]})</a></li></xml>); + (fn r => <xml><li><a link={see r.T.Id}>{[r.T.Desc]} ({[r.Len]})</a></li></xml>); return <xml><body> {ls} diff --git a/tests/blob.urp b/tests/blob.urp index 2c6be994..6e0de2ee 100644 --- a/tests/blob.urp +++ b/tests/blob.urp @@ -1,5 +1,7 @@ debug -database dbname=blob +database dbname=blobo sql blob.sql +allow mime image/gif +allow mime image/png blob |