Mercurial > urweb
view tests/pquery.ur @ 281:7d5860add50f
Change sqlify[int|float|string] to annotate with SQL types
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 04 Sep 2008 10:27:21 -0400 |
parents | fdd7a698be01 |
children | 1afa94582275 |
line wrap: on
line source
table t1 : {A : int, B : string, C : float} fun lookup (inp : {B : string}) = s <- query (SELECT t1.B FROM t1 WHERE t1.B = {inp.B}) (fn fs _ => return fs.T1.B) "Couldn't find it!"; return <html><body> Result: {cdata s} </body></html> fun main () : transaction page = return <html><body> <lform> B: <textbox{#B}/> <submit action={lookup}/> </lform> </body></html>