Mercurial > urweb
diff tests/blob.ur @ 746:2c7244c066f1
sql_ufunc and octet_length
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 26 Apr 2009 12:35:45 -0400 |
parents | ee2feab275db |
children | 034eeb099564 |
line wrap: on
line diff
--- a/tests/blob.ur Sun Apr 26 11:07:25 2009 -0400 +++ b/tests/blob.ur Sun Apr 26 12:35:45 2009 -0400 @@ -12,8 +12,8 @@ main () and main () = - ls <- queryX (SELECT t.Id, t.Desc, t.Data FROM t ORDER BY t.Desc) - (fn r => <xml><li><a link={view r.T.Id}>{[r.T.Desc]} ({[blobSize r.T.Data]})</a></li></xml>); + 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>); return <xml><body> {ls}