summaryrefslogtreecommitdiff
path: root/tests/tryDml.ur
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tryDml.ur')
-rw-r--r--tests/tryDml.ur13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tryDml.ur b/tests/tryDml.ur
new file mode 100644
index 00000000..bfe98cdb
--- /dev/null
+++ b/tests/tryDml.ur
@@ -0,0 +1,13 @@
+table t : {Id : int}
+ PRIMARY KEY Id
+
+fun doStuff () =
+ dml (INSERT INTO t (Id) VALUES (0));
+ o1 <- tryDml (INSERT INTO t (Id) VALUES (0));
+ dml (INSERT INTO t (Id) VALUES (1));
+ o2 <- tryDml (INSERT INTO t (Id) VALUES (1));
+ return <xml>{[o1]}; {[o2]}</xml>
+
+fun main () = return <xml><body>
+ <form> <submit action={doStuff}/> </form>
+</body></xml>