Mercurial > urweb
comparison lib/ur/top.urs @ 1191:61c3139eab12
Subquery expressions
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 25 Mar 2010 15:44:24 -0400 |
parents | 26fed2c4f5be |
children | 4172863d049d |
comparison
equal
deleted
inserted
replaced
1190:899875315bde | 1191:61c3139eab12 |
---|---|
124 -> r ::: {K} -> folder r | 124 -> r ::: {K} -> folder r |
125 -> $(map tf1 r) -> $(map tf2 r) -> $(map tf3 r) -> xml ctx [] [] | 125 -> $(map tf1 r) -> $(map tf2 r) -> $(map tf3 r) -> xml ctx [] [] |
126 | 126 |
127 val queryL : tables ::: {{Type}} -> exps ::: {Type} | 127 val queryL : tables ::: {{Type}} -> exps ::: {Type} |
128 -> [tables ~ exps] => | 128 -> [tables ~ exps] => |
129 sql_query tables exps | 129 sql_query [] tables exps |
130 -> transaction (list $(exps ++ map (fn fields :: {Type} => $fields) tables)) | 130 -> transaction (list $(exps ++ map (fn fields :: {Type} => $fields) tables)) |
131 | 131 |
132 val query1 : t ::: Name -> fs ::: {Type} -> state ::: Type | 132 val query1 : t ::: Name -> fs ::: {Type} -> state ::: Type |
133 -> sql_query [t = fs] [] | 133 -> sql_query [] [t = fs] [] |
134 -> ($fs -> state -> transaction state) | 134 -> ($fs -> state -> transaction state) |
135 -> state | 135 -> state |
136 -> transaction state | 136 -> transaction state |
137 | 137 |
138 val query1' : t ::: Name -> fs ::: {Type} -> state ::: Type | 138 val query1' : t ::: Name -> fs ::: {Type} -> state ::: Type |
139 -> sql_query [t = fs] [] | 139 -> sql_query [] [t = fs] [] |
140 -> ($fs -> state -> state) | 140 -> ($fs -> state -> state) |
141 -> state | 141 -> state |
142 -> transaction state | 142 -> transaction state |
143 | 143 |
144 val queryI : tables ::: {{Type}} -> exps ::: {Type} | 144 val queryI : tables ::: {{Type}} -> exps ::: {Type} |
145 -> [tables ~ exps] => | 145 -> [tables ~ exps] => |
146 sql_query tables exps | 146 sql_query [] tables exps |
147 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) | 147 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) |
148 -> transaction unit) | 148 -> transaction unit) |
149 -> transaction unit | 149 -> transaction unit |
150 | 150 |
151 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 151 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
152 -> [tables ~ exps] => | 152 -> [tables ~ exps] => |
153 sql_query tables exps | 153 sql_query [] tables exps |
154 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) | 154 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) |
155 -> xml ctx inp []) | 155 -> xml ctx inp []) |
156 -> transaction (xml ctx inp []) | 156 -> transaction (xml ctx inp []) |
157 | 157 |
158 val queryX1 : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 158 val queryX1 : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
159 -> sql_query [nm = fs] [] | 159 -> sql_query [] [nm = fs] [] |
160 -> ($fs -> xml ctx inp []) | 160 -> ($fs -> xml ctx inp []) |
161 -> transaction (xml ctx inp []) | 161 -> transaction (xml ctx inp []) |
162 | 162 |
163 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 163 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
164 -> [tables ~ exps] => | 164 -> [tables ~ exps] => |
165 sql_query tables exps | 165 sql_query [] tables exps |
166 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) | 166 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables) |
167 -> transaction (xml ctx inp [])) | 167 -> transaction (xml ctx inp [])) |
168 -> transaction (xml ctx inp []) | 168 -> transaction (xml ctx inp []) |
169 val queryX1' : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 169 val queryX1' : nm ::: Name -> fs ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
170 -> sql_query [nm = fs] [] | 170 -> sql_query [] [nm = fs] [] |
171 -> ($fs -> transaction (xml ctx inp [])) | 171 -> ($fs -> transaction (xml ctx inp [])) |
172 -> transaction (xml ctx inp []) | 172 -> transaction (xml ctx inp []) |
173 val queryXE' : exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} | 173 val queryXE' : exps ::: {Type} -> ctx ::: {Unit} -> inp ::: {Type} |
174 -> sql_query [] exps | 174 -> sql_query [] [] exps |
175 -> ($exps -> transaction (xml ctx inp [])) | 175 -> ($exps -> transaction (xml ctx inp [])) |
176 -> transaction (xml ctx inp []) | 176 -> transaction (xml ctx inp []) |
177 | 177 |
178 val hasRows : tables ::: {{Type}} -> exps ::: {Type} | 178 val hasRows : tables ::: {{Type}} -> exps ::: {Type} |
179 -> [tables ~ exps] => | 179 -> [tables ~ exps] => |
180 sql_query tables exps | 180 sql_query [] tables exps |
181 -> transaction bool | 181 -> transaction bool |
182 | 182 |
183 val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type} | 183 val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type} |
184 -> [tables ~ exps] => | 184 -> [tables ~ exps] => |
185 sql_query tables exps | 185 sql_query [] tables exps |
186 -> transaction | 186 -> transaction |
187 (option | 187 (option |
188 $(exps | 188 $(exps |
189 ++ map (fn fields :: {Type} => $fields) tables)) | 189 ++ map (fn fields :: {Type} => $fields) tables)) |
190 | 190 |
191 val oneOrNoRows1 : nm ::: Name -> fs ::: {Type} | 191 val oneOrNoRows1 : nm ::: Name -> fs ::: {Type} |
192 -> sql_query [nm = fs] [] | 192 -> sql_query [] [nm = fs] [] |
193 -> transaction (option $fs) | 193 -> transaction (option $fs) |
194 | 194 |
195 val oneOrNoRowsE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type | 195 val oneOrNoRowsE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type |
196 -> [tabs ~ [nm]] => | 196 -> [tabs ~ [nm]] => |
197 sql_query (mapU [] tabs) [nm = t] | 197 sql_query [] (mapU [] tabs) [nm = t] |
198 -> transaction (option t) | 198 -> transaction (option t) |
199 | 199 |
200 val oneRow : tables ::: {{Type}} -> exps ::: {Type} | 200 val oneRow : tables ::: {{Type}} -> exps ::: {Type} |
201 -> [tables ~ exps] => | 201 -> [tables ~ exps] => |
202 sql_query tables exps | 202 sql_query [] tables exps |
203 -> transaction | 203 -> transaction |
204 $(exps | 204 $(exps |
205 ++ map (fn fields :: {Type} => $fields) tables) | 205 ++ map (fn fields :: {Type} => $fields) tables) |
206 | 206 |
207 val oneRow1 : nm ::: Name -> fs ::: {Type} | 207 val oneRow1 : nm ::: Name -> fs ::: {Type} |
208 -> sql_query [nm = fs] [] | 208 -> sql_query [] [nm = fs] [] |
209 -> transaction $fs | 209 -> transaction $fs |
210 | 210 |
211 val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type | 211 val oneRowE1 : tabs ::: {Unit} -> nm ::: Name -> t ::: Type |
212 -> [tabs ~ [nm]] => | 212 -> [tabs ~ [nm]] => |
213 sql_query (mapU [] tabs) [nm = t] | 213 sql_query [] (mapU [] tabs) [nm = t] |
214 -> transaction t | 214 -> transaction t |
215 | 215 |
216 val nonempty : fs ::: {Type} -> us ::: {{Unit}} -> sql_table fs us | 216 val nonempty : fs ::: {Type} -> us ::: {{Unit}} -> sql_table fs us |
217 -> transaction bool | 217 -> transaction bool |
218 | 218 |