summaryrefslogtreecommitdiff
path: root/lib/ur/top.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 13:00:55 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 13:00:55 -0500
commit1063981355a5a041793c095c6fd89b91fa0bd579 (patch)
tree5efa45fb63fd11922b53c5575df691072fcbbeca /lib/ur/top.ur
parent46d562fc3d06a5ef8b17e90c7a4dfd0547757294 (diff)
Weakening-type coercions for SQL values
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r--lib/ur/top.ur7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index ffdd85bf..8b737179 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -234,6 +234,13 @@ fun queryX' [tables ::: {{Type}}] [exps ::: {Type}] [ctx ::: {Unit}] [inp ::: {T
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) =