table t : { O : option int } fun addNull () = dml (INSERT INTO t (O) VALUES (NULL)); return Done fun add3 () = dml (INSERT INTO t (O) VALUES ({Some 3})); return Done fun addN r = dml (INSERT INTO t (O) VALUES ({Some (readError r.N)})); return Done fun main () : transaction page = xml <- queryX (SELECT * FROM t) (fn r => case r.T.O of None => Nada
| Some n => Num: {[n]}
); return {xml} Add a null
Add a 3
Add