Mercurial > urweb
comparison lib/ur/top.urs @ 1076:dcf98ae3c48d
Allow same constructor shorthand for 'view' sig items as for 'table'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 15 Dec 2009 11:11:49 -0500 |
parents | d89f98f0b4bb |
children | 25d491287358 |
comparison
equal
deleted
inserted
replaced
1075:0657e5adc938 | 1076:dcf98ae3c48d |
---|---|
130 sql_query tables exps | 130 sql_query tables exps |
131 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) | 131 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) |
132 -> xml ctx inp []) | 132 -> xml ctx inp []) |
133 -> transaction (xml ctx inp []) | 133 -> transaction (xml ctx inp []) |
134 | 134 |
135 val queryX1 : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | |
136 -> sql_query [nm = fs] [] | |
137 -> ($fs -> xml ctx inp []) | |
138 -> transaction (xml ctx inp []) | |
139 | |
135 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 140 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
136 -> [tables ~ exps] => | 141 -> [tables ~ exps] => |
137 sql_query tables exps | 142 sql_query tables exps |
138 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) | 143 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) |
139 -> transaction (xml ctx inp [])) | 144 -> transaction (xml ctx inp [])) |
154 | 159 |
155 val oneOrNoRows1 : nm ::: Name -> fs ::: {Type} | 160 val oneOrNoRows1 : nm ::: Name -> fs ::: {Type} |
156 -> sql_query [nm = fs] [] | 161 -> sql_query [nm = fs] [] |
157 -> transaction (option $fs) | 162 -> transaction (option $fs) |
158 | 163 |
159 val oneOrNoRowsE1 : tab ::: Name -> nm ::: Name -> t ::: Type | 164 val oneOrNoRowsE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type |
160 -> [[tab] ~ [nm]] => | 165 -> [tabs ~ [nm]] => |
161 sql_query [tab = []] [nm = t] | 166 sql_query (mapU [] tabs) [nm = t] |
162 -> transaction (option t) | 167 -> transaction (option t) |
163 | 168 |
164 val oneRow : tables ::: {{Type}} -> exps ::: {Type} | 169 val oneRow : tables ::: {{Type}} -> exps ::: {Type} |
165 -> [tables ~ exps] => | 170 -> [tables ~ exps] => |
166 sql_query tables exps | 171 sql_query tables exps |
167 -> transaction | 172 -> transaction |
168 $(exps | 173 $(exps |
169 ++ map (fn fields :: {Type} => $fields) tables) | 174 ++ map (fn fields :: {Type} => $fields) tables) |
175 | |
176 val oneRow1 : nm ::: Name -> fs ::: {Type} | |
177 -> sql_query [nm = fs] [] | |
178 -> transaction $fs | |
170 | 179 |
171 val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type | 180 val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type |
172 -> [tabs ~ [nm]] => | 181 -> [tabs ~ [nm]] => |
173 sql_query (mapU [] tabs) [nm = t] | 182 sql_query (mapU [] tabs) [nm = t] |
174 -> transaction t | 183 -> transaction t |