Mercurial > urweb
changeset 1064:b89e3d8731ed
Make oneRowE1 more general
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 10 Dec 2009 12:06:03 -0500 |
parents | e3f6620afd51 |
children | 217eb87dde31 |
files | lib/ur/top.ur lib/ur/top.urs |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ur/top.ur Tue Dec 08 12:06:41 2009 -0500 +++ b/lib/ur/top.ur Thu Dec 10 12:06:03 2009 -0500 @@ -258,7 +258,7 @@ None => error <xml>Query returned no rows</xml> | Some r => r) -fun oneRowE1 [tab ::: Name] [nm ::: Name] [t ::: Type] [[tab] ~ [nm]] (q : sql_query [tab = []] [nm = t]) = +fun oneRowE1 [tabs ::: {Unit}] [nm ::: Name] [t ::: Type] [tabs ~ [nm]] (q : sql_query (mapU [] tabs) [nm = t]) = o <- oneOrNoRows q; return (case o of None => error <xml>Query returned no rows</xml>
--- a/lib/ur/top.urs Tue Dec 08 12:06:41 2009 -0500 +++ b/lib/ur/top.urs Thu Dec 10 12:06:03 2009 -0500 @@ -163,9 +163,9 @@ $(exps ++ map (fn fields :: {Type} => $fields) tables) -val oneRowE1 : tab ::: Name -> nm ::: Name -> t ::: Type - -> [[tab] ~ [nm]] => - sql_query [tab = []] [nm = t] +val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type + -> [tabs ~ [nm]] => + sql_query (mapU [] tabs) [nm = t] -> transaction t val eqNullable : tables ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type}