diff options
author | 2009-12-15 11:11:49 -0500 | |
---|---|---|
committer | 2009-12-15 11:11:49 -0500 | |
commit | ab13bbf764595fe6c01fcb5fe61bdf464d77f7fe (patch) | |
tree | a6950e374ba47268bc2bc5ee4cb14dd5a6f3d5b1 /lib/ur/top.urs | |
parent | 6179a09d47c5af4db1ac41d00b8cb7ec36741c3e (diff) |
Allow same constructor shorthand for 'view' sig items as for 'table'
Diffstat (limited to 'lib/ur/top.urs')
-rw-r--r-- | lib/ur/top.urs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/ur/top.urs b/lib/ur/top.urs index 57bc2b1e..92fb9edd 100644 --- a/lib/ur/top.urs +++ b/lib/ur/top.urs @@ -132,6 +132,11 @@ val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: -> xml ctx inp []) -> transaction (xml ctx inp []) +val queryX1 : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} + -> sql_query [nm = fs] [] + -> ($fs -> xml ctx inp []) + -> transaction (xml ctx inp []) + val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} -> [tables ~ exps] => sql_query tables exps @@ -156,9 +161,9 @@ val oneOrNoRows1 : nm ::: Name -> fs ::: {Type} -> sql_query [nm = fs] [] -> transaction (option $fs) -val oneOrNoRowsE1 : tab ::: Name -> nm ::: Name -> t ::: Type - -> [[tab] ~ [nm]] => - sql_query [tab = []] [nm = t] +val oneOrNoRowsE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type + -> [tabs ~ [nm]] => + sql_query (mapU [] tabs) [nm = t] -> transaction (option t) val oneRow : tables ::: {{Type}} -> exps ::: {Type} @@ -168,6 +173,10 @@ val oneRow : tables ::: {{Type}} -> exps ::: {Type} $(exps ++ map (fn fields :: {Type} => $fields) tables) +val oneRow1 : nm ::: Name -> fs ::: {Type} + -> sql_query [nm = fs] [] + -> transaction $fs + val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type -> [tabs ~ [nm]] => sql_query (mapU [] tabs) [nm = t] |