diff options
author | 2009-10-06 13:11:03 -0400 | |
---|---|---|
committer | 2009-10-06 13:11:03 -0400 | |
commit | 37f1efc23e011927873cfc5871ac7686eac5a745 (patch) | |
tree | 0678ebf96e02863f7ab6dc5eea1adf7d4c3bb127 /demo/more/orm1.ur | |
parent | 79edb644cdc9c2218be3c34151eb69a84fb8344e (diff) |
Finalized Orm1 demo
Diffstat (limited to 'demo/more/orm1.ur')
-rw-r--r-- | demo/more/orm1.ur | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/demo/more/orm1.ur b/demo/more/orm1.ur index bdf6ef8c..bbbe2b00 100644 --- a/demo/more/orm1.ur +++ b/demo/more/orm1.ur @@ -11,10 +11,12 @@ structure S = Table(struct end) fun action () = - r <- T.create {A = 3, B = "Hi"}; - T.save (r -- #B ++ {B = "Bye"}); + r1 <- T.create {A = 3, B = "Hi"}; + T.save (r1 -- #B ++ {B = "Bye"}); + r2 <- T.create {A = 4, B = "Why"}; + r3 <- T.create {A = 66, B = "Hi"}; - s <- S.create {C = r.Id, D = 45.67}; + s <- S.create {C = r1.Id, D = 45.67}; ls <- T.list; ls' <- T.search (T.eq T.cols.B.Col "Hi"); @@ -22,6 +24,12 @@ fun action () = lsS <- S.list; lsS <- List.mapM (fn r => p <- S.cols.C.Parent r; return (r, p)) lsS; + T.delete r1; + T.delete r2; + T.delete r3; + + S.delete s; + return <xml><body> {List.mapX (fn r => <xml><li> {[r.A]}: {[r.B]}</li></xml>) ls} <br/> |