Mercurial > urweb
comparison tests/tryDml.ur @ 1293:acabf3935060
tryDml
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 05 Sep 2010 14:00:57 -0400 |
parents | |
children | 929981850d9d |
comparison
equal
deleted
inserted
replaced
1292:a671c986f517 | 1293:acabf3935060 |
---|---|
1 table t : {Id : int} | |
2 PRIMARY KEY Id | |
3 | |
4 fun doStuff () = | |
5 dml (INSERT INTO t (Id) VALUES (0)); | |
6 o1 <- tryDml (INSERT INTO t (Id) VALUES (0)); | |
7 dml (INSERT INTO t (Id) VALUES (1)); | |
8 o2 <- tryDml (INSERT INTO t (Id) VALUES (1)); | |
9 return <xml>{[o1]}; {[o2]}</xml> | |
10 | |
11 fun main () = return <xml><body> | |
12 <form> <submit action={doStuff}/> </form> | |
13 </body></xml> |