summaryrefslogtreecommitdiff
path: root/lib/top.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 19:03:55 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 19:03:55 -0400
commitfe35c44cd34ceb2a2f02b27f56bf1607557bb89a (patch)
tree947cb1a65fa285087e64c14a5c08a9804bc83a7a /lib/top.ur
parent7b9035e69d65f463da21a82d5f35deebaf1986ac (diff)
Crud update form
Diffstat (limited to 'lib/top.ur')
-rw-r--r--lib/top.ur6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/top.ur b/lib/top.ur
index 15f2a732..990a18fa 100644
--- a/lib/top.ur
+++ b/lib/top.ur
@@ -103,3 +103,9 @@ fun queryX (tables ::: {{Type}}) (exps ::: {Type}) (ctx ::: {Unit}) (q : sql_que
query q
(fn fs acc => return <xml>{acc}{f fs}</xml>)
<xml></xml>
+
+fun oneOrNoRows (tables ::: {{Type}}) (exps ::: {Type}) (q : sql_query tables exps) =
+ [tables ~ exps] =>
+ query q
+ (fn fs _ => return (Some fs))
+ None