diff options
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/> |