summaryrefslogtreecommitdiff
path: root/lib/ur/top.ur
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r--lib/ur/top.ur5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur
index 6a0f8751..10b3f711 100644
--- a/lib/ur/top.ur
+++ b/lib/ur/top.ur
@@ -246,6 +246,11 @@ fun oneOrNoRows1 [nm ::: Name] [fs ::: {Type}] (q : sql_query [nm = fs] []) =
(fn fs _ => return (Some fs.nm))
None
+fun oneOrNoRowsE1 [tab ::: Name] [nm ::: Name] [t ::: Type] [[tab] ~ [nm]] (q : sql_query [tab = []] [nm = t]) =
+ query q
+ (fn fs _ => return (Some fs.nm))
+ None
+
fun oneRow [tables ::: {{Type}}] [exps ::: {Type}]
[tables ~ exps] (q : sql_query tables exps) =
o <- oneOrNoRows q;