diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-11-06 17:09:53 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-11-06 17:09:53 -0500 |
commit | 36952b2e49afdb4ba8024eb6372992e4b5d8df7a (patch) | |
tree | 16401277a8c24a1bcfcc410700526f64ba27a5b8 /lib/top.urs | |
parent | 49f721d39e46ab0635cc2e9a5ed2a66944586640 (diff) |
About to begin optimization of recursive transaction functions
Diffstat (limited to 'lib/top.urs')
-rw-r--r-- | lib/top.urs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/top.urs b/lib/top.urs index d52ec9d7..6653db07 100644 --- a/lib/top.urs +++ b/lib/top.urs @@ -141,6 +141,14 @@ val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> xml ctx [] []) -> transaction (xml ctx [] []) +val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} + -> sql_query tables exps + -> fn [tables ~ exps] => + ($(exps ++ fold (fn nm (fields :: {Type}) acc [[nm] ~ acc] => + [nm = $fields] ++ acc) [] tables) + -> transaction (xml ctx [] [])) + -> transaction (xml ctx [] []) + val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type} -> sql_query tables exps -> fn [tables ~ exps] => |