adamc@678: sequence s adamc@678: table t : { Id : int, Title : string, Chan : option (channel string) } adamc@678: adamc@678: fun list () = adamc@678: queryX (SELECT * FROM t) adamc@678: (fn r => adamc@678: {[r.T.Id]} {[r.T.Title]} adamc@678: [delete] adamc@678: ) adamc@678: adamc@678: and delete id = adamc@678: dml (DELETE FROM t WHERE Id = {[id]}); adamc@678: main () adamc@678: adamc@678: and main () : transaction page = adamc@678: let adamc@678: fun create r = adamc@678: id <- nextval s; adamc@678: dml (INSERT INTO t (Id, Title, Chan) VALUES ({[id]}, {[r.Title]}, NULL)); adamc@678: main () adamc@678: in adamc@678: ls <- list (); adamc@678: return adamc@678: adamc@678: adamc@678: {ls} adamc@678:
ID Title
adamc@678: adamc@678:

New Channel

adamc@678: adamc@678:
adamc@678: Title:
adamc@678: adamc@678: adamc@678:
adamc@678: end