diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpcDO.ur | 25 | ||||
-rw-r--r-- | tests/rpcDO.urp | 5 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/rpcDO.ur b/tests/rpcDO.ur new file mode 100644 index 00000000..4ba6015c --- /dev/null +++ b/tests/rpcDO.ur @@ -0,0 +1,25 @@ +datatype list t = Nil | Cons of t * list t + +table t : {A : int} + +fun main () : transaction page = + let + fun rows () = + query (SELECT * FROM t) + (fn r ls => return (Cons (r.T.A, ls))) + Nil + + fun show ls = + case ls of + Nil => <xml/> + | Cons (x, ls') => <xml>{[x]}<br/>{show ls'}</xml> + in + s <- source Nil; + return <xml><body> + <button value="Get It On!" + onclick={ls <- rows (); + set s ls}/><br/> + <br/> + Current: <dyn signal={ls <- signal s; return (show ls)}/> + </body></xml> + end diff --git a/tests/rpcDO.urp b/tests/rpcDO.urp new file mode 100644 index 00000000..7d9bb6a6 --- /dev/null +++ b/tests/rpcDO.urp @@ -0,0 +1,5 @@ +debug +sql rpcDO.sql +database dbname=rpcdo + +rpcDO |