diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-10-06 13:11:03 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-10-06 13:11:03 -0400 |
commit | 1de883737e14d5b6dbd442c5f92ca6e97d9322b5 (patch) | |
tree | 0678ebf96e02863f7ab6dc5eea1adf7d4c3bb127 /demo/more/orm1.ur | |
parent | 140bf664ca2e8e0f38650226d025eab952d93b9e (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/> |