Mercurial > urweb
view tests/cookie.ur @ 1866:9fc086e3c95a
Add hex SQL syntax for blobs, such as X'0ABC12343'. Works with sqlite.
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Fri, 13 Sep 2013 10:09:15 -0400 |
parents | 1626dcba13ee |
children |
line wrap: on
line source
cookie c : string fun other () = so <- getCookie c; case so of None => return <xml>No cookie</xml> | Some s => return <xml>Cookie: {[s]}</xml> structure M = struct fun aux () = setCookie c "Hi"; so <- getCookie c; case so of None => return <xml>No cookie</xml> | Some s => return <xml><body>Cookie: {[s]}<br/> <a link={other ()}>Other</a></body></xml> end fun main () : transaction page = return <xml><body> <a link={other ()}>Other</a><br/> <a link={M.aux ()}>Aux</a><br/> </body></xml>