comparison tests/blob.ur @ 745:ee2feab275db

blobSize
author Adam Chlipala <adamc@hcoop.net>
date Sun, 26 Apr 2009 11:07:25 -0400
parents 43553c93dd8c
children 2c7244c066f1
comparison
equal deleted inserted replaced
744:1ef3c1ef617d 745:ee2feab275db
10 dml (INSERT INTO t (Id, Nam, Data, Desc, Typ) 10 dml (INSERT INTO t (Id, Nam, Data, Desc, Typ)
11 VALUES ({[id]}, {[fileName r.Data]}, {[fileData r.Data]}, {[r.Desc]}, {[fileMimeType r.Data]})); 11 VALUES ({[id]}, {[fileName r.Data]}, {[fileData r.Data]}, {[r.Desc]}, {[fileMimeType r.Data]}));
12 main () 12 main ()
13 13
14 and main () = 14 and main () =
15 ls <- queryX (SELECT t.Id, t.Desc FROM t ORDER BY t.Desc) 15 ls <- queryX (SELECT t.Id, t.Desc, t.Data FROM t ORDER BY t.Desc)
16 (fn r => <xml><li><a link={view r.T.Id}>{[r.T.Desc]}</a></li></xml>); 16 (fn r => <xml><li><a link={view r.T.Id}>{[r.T.Desc]} ({[blobSize r.T.Data]})</a></li></xml>);
17 return <xml><body> 17 return <xml><body>
18 {ls} 18 {ls}
19 19
20 <br/> 20 <br/>
21 21