diff lib/ur/top.urs @ 1003:61c30f0742d7

Registering for Conference1
author Adam Chlipala <adamc@hcoop.net>
date Tue, 20 Oct 2009 11:05:58 -0400
parents 10114d7b7477
children a87495bcaeec
line wrap: on
line diff
--- a/lib/ur/top.urs	Tue Oct 20 10:29:17 2009 -0400
+++ b/lib/ur/top.urs	Tue Oct 20 11:05:58 2009 -0400
@@ -147,13 +147,22 @@
                               $(exps
                                     ++ map (fn fields :: {Type} => $fields) tables))
 
+val oneOrNoRows1 : nm ::: Name -> fs ::: {Type}
+                   -> sql_query [nm = fs] []
+                   -> transaction (option $fs)
+
 val oneRow : tables ::: {{Type}} -> exps ::: {Type}
              -> [tables ~ exps] =>
              sql_query tables exps
              -> transaction
                     $(exps
                           ++ map (fn fields :: {Type} => $fields) tables)
-                
+
+val oneRowE1 : tab ::: Name -> nm ::: Name -> t ::: Type
+               -> [[tab] ~ [nm]] =>
+    sql_query [tab = []] [nm = t]
+    -> transaction t
+
 val eqNullable : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}
                  -> t ::: Type -> sql_injectable (option t)
                  -> sql_exp tables agg exps (option t)