diff options
author | 2008-09-13 19:49:53 -0400 | |
---|---|---|
committer | 2008-09-13 19:49:53 -0400 | |
commit | 92865c5cf94bde77b7250450042e915a48e0025d (patch) | |
tree | 356d6e919b861559a016a13aeedc5a32fac63dd3 /lib/top.urs | |
parent | a5a647f670f8e2fa7749e29aee39e2511afb2a21 (diff) |
queryX
Diffstat (limited to 'lib/top.urs')
-rw-r--r-- | lib/top.urs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/top.urs b/lib/top.urs index 0e211373..b124caa2 100644 --- a/lib/top.urs +++ b/lib/top.urs @@ -19,3 +19,9 @@ val foldTRX2 : tf1 :: (Type -> Type) -> tf2 :: (Type -> Type) -> ctx :: {Unit} -> (nm :: Name -> t :: Type -> rest :: {Type} -> [nm] ~ rest -> tf1 t -> tf2 t -> xml ctx [] []) -> r :: {Type} -> $(mapTT tf1 r) -> $(mapTT tf2 r) -> xml ctx [] [] + +val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} + -> sql_query tables exps -> tables ~ exps + -> ($(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables) + -> xml ctx [] []) + -> transaction (xml ctx [] []) |