diff lib/top.urs @ 440:19d7f79cd584

Time MIN/MAX
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Oct 2008 15:16:37 -0400
parents 0ce90d4d9ae7
children dfc8c991abd0
line wrap: on
line diff
--- a/lib/top.urs	Thu Oct 30 15:11:37 2008 -0400
+++ b/lib/top.urs	Thu Oct 30 15:16:37 2008 -0400
@@ -116,3 +116,13 @@
                                                       [[nm] ~ acc] =>
                                                    [nm = $fields] ++ acc)
                                                    [] tables))
+
+val oneRow : tables ::: {{Type}} -> exps ::: {Type}
+             -> sql_query tables exps
+             -> fn [tables ~ exps] =>
+                   transaction
+                       $(exps
+                             ++ fold (fn nm (fields :: {Type}) acc
+                                            [[nm] ~ acc] =>
+                                         [nm = $fields] ++ acc)
+                                         [] tables)