diff options
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r-- | lib/ur/top.ur | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index b6e4f6cf..617423db 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -215,6 +215,14 @@ fun mapX3 [K] [tf1 :: K -> Type] [tf2 :: K -> Type] [tf3 :: K -> Type] [ctx :: { <xml>{f [nm] [t] [rest] ! r1 r2 r3}{acc}</xml>) <xml/> +fun query1 [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] []) + (f : $fs -> state -> transaction state) (i : state) = + query q (fn r => f r.t) i + +fun query1' [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] []) + (f : $fs -> state -> state) (i : state) = + query q (fn r s => return (f r.t s)) i + fun queryL [tables] [exps] [tables ~ exps] (q : sql_query tables exps) = query q (fn r ls => return (r :: ls)) |