diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-02-15 13:03:09 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-02-15 13:03:09 -0500 |
commit | 4f0987ddef3dc105c3883aa9c1c69c29fbe86a8a (patch) | |
tree | 30c7775fe1755a17af3ea46d0a02ebf077c822ac /tests | |
parent | f083e82c95ac4a9d3a22e032f81b6dc88a88f499 (diff) |
Parameterized RPC query
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpcN.ur | 16 | ||||
-rw-r--r-- | tests/rpcN.urp | 5 |
2 files changed, 21 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 diff --git a/tests/rpcN.urp b/tests/rpcN.urp new file mode 100644 index 00000000..6181d8b6 --- /dev/null +++ b/tests/rpcN.urp @@ -0,0 +1,5 @@ +debug +sql rpcN.sql +database dbname=rpcN + +rpcN |