adamc@410: table t : { A : int, B : float, C : string, D : bool }
adamc@708: PRIMARY KEY A
adamc@410:
adamc@410: fun list () =
adamc@410: rows <- queryX (SELECT * FROM t)
adamc@410: (fn row =>
adamc@410: {[row.T.A]} | {[row.T.B]} | {[row.T.C]} | {[row.T.D]} |
adamc@732: |
adamc@410:
);
adamc@410: return
adamc@410:
adamc@410: A | B | C | D |
adamc@410: {rows}
adamc@410:
adamc@410:
adamc@410:
adamc@410:
adamc@410:
adamc@410:
adamc@410:
adamc@410: and add r =
adamc@434: dml (INSERT INTO t (A, B, C, D)
adamc@471: VALUES ({[readError r.A]}, {[readError r.B]}, {[r.C]}, {[r.D]}));
adamc@410: xml <- list ();
adamc@410: return
adamc@410: Row added.
adamc@410:
adamc@410: {xml}
adamc@410:
adamc@410:
adamc@732: and delete a () =
adamc@434: dml (DELETE FROM t
adamc@471: WHERE t.A = {[a]});
adamc@410: xml <- list ();
adamc@410: return
adamc@410: Row deleted.
adamc@410:
adamc@410: {xml}
adamc@410:
adamc@410:
adamc@410: fun main () =
adamc@410: xml <- list ();
adamc@410: return
adamc@410: {xml}
adamc@410: