diff options
author | 2009-02-15 13:03:09 -0500 | |
---|---|---|
committer | 2009-02-15 13:03:09 -0500 | |
commit | 4f0987ddef3dc105c3883aa9c1c69c29fbe86a8a (patch) | |
tree | 30c7775fe1755a17af3ea46d0a02ebf077c822ac /tests/rpcN.ur | |
parent | f083e82c95ac4a9d3a22e032f81b6dc88a88f499 (diff) |
Parameterized RPC query
Diffstat (limited to 'tests/rpcN.ur')
-rw-r--r-- | tests/rpcN.ur | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rpcN.ur b/tests/rpcN.ur new file mode 100644 index 00000000..857b5ed0 --- /dev/null +++ b/tests/rpcN.ur @@ -0,0 +1,16 @@ +table t : { A : int } + +fun main () : transaction page = + let + fun count a = r <- oneRow (SELECT COUNT( * ) AS N FROM t WHERE t.A = {[a]}); + return r.N + in + s <- source 0; + return <xml><body> + <button value="Get It On!" + onclick={n <- count 3; + set s n}/><br/> + <br/> + Current: <dyn signal={n <- signal s; return <xml>{[n]}</xml>}/> + </body></xml> + end |