diff lib/top.urs @ 341:389399d65331

Crud update form
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 19:03:55 -0400
parents 075b36dbb1a4
children b85e6ba56618
line wrap: on
line diff
--- a/lib/top.urs	Sun Sep 14 15:20:53 2008 -0400
+++ b/lib/top.urs	Sun Sep 14 19:03:55 2008 -0400
@@ -66,3 +66,8 @@
         -> ($(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables)
                 -> xml ctx [] [])
         -> transaction (xml ctx [] [])
+
+val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type} -> sql_query tables exps
+        -> tables ~ exps
+        -> transaction
+                (option $(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables))