summaryrefslogtreecommitdiff
path: root/tests/tryDml.ur
blob: bfe98cdb4562f8d4113559a7c781b6e40b805e04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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>