Mercurial > urweb
annotate tests/tryDml.ur @ 1906:0d2fdc2cc46c
Allow building in a separate build directory
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
Makefile.am | 30 +++---
src/c/Makefile.am | 2 +-
src/compiler.mlb | 2 +-
src/sources | 302 +++++++++++++++++++++++++++---------------------------
4 files changed, 168 insertions(+), 168 deletions(-)
author | Anders Kaseorg <andersk@mit.edu> |
---|---|
date | Fri, 22 Nov 2013 09:36:14 -0500 |
parents | 929981850d9d |
children |
rev | line source |
---|---|
adam@1293 | 1 table t : {Id : int} |
adam@1293 | 2 PRIMARY KEY Id |
adam@1293 | 3 |
adam@1293 | 4 fun doStuff () = |
adam@1293 | 5 dml (INSERT INTO t (Id) VALUES (0)); |
adam@1293 | 6 o1 <- tryDml (INSERT INTO t (Id) VALUES (0)); |
adam@1293 | 7 dml (INSERT INTO t (Id) VALUES (1)); |
adam@1295 | 8 o2 <- tryDml (INSERT INTO t (Id) VALUES (2)); |
adam@1295 | 9 dml (INSERT INTO t (Id) VALUES (3)); |
adam@1295 | 10 o3 <- tryDml (INSERT INTO t (Id) VALUES (3)); |
adam@1295 | 11 return <xml>{[o1]}; {[o2]}; {[o3]}</xml> |
adam@1293 | 12 |
adam@1293 | 13 fun main () = return <xml><body> |
adam@1293 | 14 <form> <submit action={doStuff}/> </form> |
adam@1293 | 15 </body></xml> |