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