From eaa8aa9f310d95a31747ea4c81ee1013c1734a7d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 4 Nov 2008 09:33:35 -0500 Subject: Nested demo --- demo/crud.ur | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'demo/crud.ur') diff --git a/demo/crud.ur b/demo/crud.ur index 77fccf16..ee6a95f6 100644 --- a/demo/crud.ur +++ b/demo/crud.ur @@ -100,9 +100,9 @@ functor Make(M : sig sql_exp [] [] [] t.1) cols)] (fn (nm :: Name) (t :: (Type * Type)) (rest :: {(Type * Type)}) [[nm] ~ rest] => - fn input col acc => acc with nm = @sql_inject col.Inject (col.Parse input)) + fn input col acc => acc ++ {nm = @sql_inject col.Inject (col.Parse input)}) {} [M.cols] inputs M.cols - with #Id = (SQL {id}))); + ++ {Id = (SQL {id})})); ls <- list (); return

Inserted with ID {[id]}.

@@ -119,8 +119,8 @@ functor Make(M : sig [] [] t.1) cols)] (fn (nm :: Name) (t :: (Type * Type)) (rest :: {(Type * Type)}) [[nm] ~ rest] => - fn input col acc => acc with nm = - @sql_inject col.Inject (col.Parse input)) + fn input col acc => acc ++ {nm = + @sql_inject col.Inject (col.Parse input)}) {} [M.cols] inputs M.cols) tab (WHERE T.Id = {id})); ls <- list (); -- cgit v1.2.3