Mercurial > urweb
diff lib/top.urs @ 334:9601c717d2f3
queryX
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 13 Sep 2008 19:49:53 -0400 |
parents | 02d15d81ae9b |
children | 34847732cefc |
line wrap: on
line diff
--- a/lib/top.urs Sat Sep 13 14:58:57 2008 -0400 +++ b/lib/top.urs Sat Sep 13 19:49:53 2008 -0400 @@ -19,3 +19,9 @@ -> (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 [] [])