diff lib/ur/top.ur @ 1072:9001966ae1c8

Weakening-type coercions for SQL values
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 13:00:55 -0500
parents b89e3d8731ed
children d89f98f0b4bb
line wrap: on
line diff
--- a/lib/ur/top.ur	Sun Dec 13 11:28:47 2009 -0500
+++ b/lib/ur/top.ur	Sun Dec 13 13:00:55 2009 -0500
@@ -234,6 +234,13 @@
               return <xml>{acc}{r}</xml>)
           <xml/>
 
+fun hasRows [tables ::: {{Type}}] [exps ::: {Type}]
+            [tables ~ exps]
+            (q : sql_query tables exps) =
+    query q
+          (fn _ _ => return True)
+          False
+
 fun oneOrNoRows [tables ::: {{Type}}] [exps ::: {Type}]
                 [tables ~ exps]
                 (q : sql_query tables exps) =