comparison tests/tryDml.ur @ 1295:929981850d9d

'tryDml' works with Postgres
author Adam Chlipala <adam@chlipala.net>
date Tue, 07 Sep 2010 09:06:13 -0400
parents acabf3935060
children
comparison
equal deleted inserted replaced
1294:b4480a56cab7 1295:929981850d9d
3 3
4 fun doStuff () = 4 fun doStuff () =
5 dml (INSERT INTO t (Id) VALUES (0)); 5 dml (INSERT INTO t (Id) VALUES (0));
6 o1 <- tryDml (INSERT INTO t (Id) VALUES (0)); 6 o1 <- tryDml (INSERT INTO t (Id) VALUES (0));
7 dml (INSERT INTO t (Id) VALUES (1)); 7 dml (INSERT INTO t (Id) VALUES (1));
8 o2 <- tryDml (INSERT INTO t (Id) VALUES (1)); 8 o2 <- tryDml (INSERT INTO t (Id) VALUES (2));
9 return <xml>{[o1]}; {[o2]}</xml> 9 dml (INSERT INTO t (Id) VALUES (3));
10 o3 <- tryDml (INSERT INTO t (Id) VALUES (3));
11 return <xml>{[o1]}; {[o2]}; {[o3]}</xml>
10 12
11 fun main () = return <xml><body> 13 fun main () = return <xml><body>
12 <form> <submit action={doStuff}/> </form> 14 <form> <submit action={doStuff}/> </form>
13 </body></xml> 15 </body></xml>