Mercurial > urweb
comparison lib/ur/basis.urs @ 1072:9001966ae1c8
Weakening-type coercions for SQL values
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 13 Dec 2009 13:00:55 -0500 |
parents | 26197c957ad6 |
children | b2311dfb3158 |
comparison
equal
deleted
inserted
replaced
1071:26197c957ad6 | 1072:9001966ae1c8 |
---|---|
254 -> {OnDelete : propagation_mode ([mine1 = t] ++ mine), | 254 -> {OnDelete : propagation_mode ([mine1 = t] ++ mine), |
255 OnUpdate : propagation_mode ([mine1 = t] ++ mine)} | 255 OnUpdate : propagation_mode ([mine1 = t] ++ mine)} |
256 -> sql_constraint ([mine1 = t] ++ mine ++ munused) [] | 256 -> sql_constraint ([mine1 = t] ++ mine ++ munused) [] |
257 | 257 |
258 con sql_exp :: {{Type}} -> {{Type}} -> {Type} -> Type -> Type | 258 con sql_exp :: {{Type}} -> {{Type}} -> {Type} -> Type -> Type |
259 val sql_exp_weaken : fs ::: {{Type}} -> agg ::: {{Type}} -> exps ::: {Type} -> t ::: Type | |
260 -> fs' ::: {{Type}} -> agg' ::: {{Type}} -> exps' ::: {Type} | |
261 -> [fs ~ fs'] => [agg ~ agg'] => [exps ~ exps'] => | |
262 sql_exp fs agg exps t | |
263 -> sql_exp (fs ++ fs') (agg ++ agg') (exps ++ exps') t | |
259 | 264 |
260 val check : fs ::: {Type} | 265 val check : fs ::: {Type} |
261 -> sql_exp [] [] fs bool | 266 -> sql_exp [] [] fs bool |
262 -> sql_constraint fs [] | 267 -> sql_constraint fs [] |
263 | 268 |
272 val sql_subset : keep_drop :: {({Type} * {Type})} | 277 val sql_subset : keep_drop :: {({Type} * {Type})} |
273 -> sql_subset | 278 -> sql_subset |
274 (map (fn fields :: ({Type} * {Type}) => fields.1 ++ fields.2) keep_drop) | 279 (map (fn fields :: ({Type} * {Type}) => fields.1 ++ fields.2) keep_drop) |
275 (map (fn fields :: ({Type} * {Type}) => fields.1) keep_drop) | 280 (map (fn fields :: ({Type} * {Type}) => fields.1) keep_drop) |
276 val sql_subset_all : tables :: {{Type}} -> sql_subset tables tables | 281 val sql_subset_all : tables :: {{Type}} -> sql_subset tables tables |
282 val sql_subset_concat : big1 ::: {{Type}} -> little1 ::: {{Type}} | |
283 -> big2 ::: {{Type}} -> little2 ::: {{Type}} | |
284 -> [big1 ~ big2] => [little1 ~ little2] => | |
285 sql_subset big1 little1 | |
286 -> sql_subset big2 little2 | |
287 -> sql_subset (big1 ++ big2) (little1 ++ little2) | |
277 | 288 |
278 con sql_from_items :: {{Type}} -> Type | 289 con sql_from_items :: {{Type}} -> Type |
279 | 290 |
280 val sql_from_table : t ::: Type -> fs ::: {Type} | 291 val sql_from_table : t ::: Type -> fs ::: {Type} |
281 -> fieldsOf t fs -> name :: Name | 292 -> fieldsOf t fs -> name :: Name |
341 -> selectedFields ::: {{Type}} | 352 -> selectedFields ::: {{Type}} |
342 -> selectedExps ::: {Type} | 353 -> selectedExps ::: {Type} |
343 -> sql_relop | 354 -> sql_relop |
344 -> sql_query1 tables1 selectedFields selectedExps | 355 -> sql_query1 tables1 selectedFields selectedExps |
345 -> sql_query1 tables2 selectedFields selectedExps | 356 -> sql_query1 tables2 selectedFields selectedExps |
346 -> sql_query1 selectedFields selectedFields selectedExps | 357 -> sql_query1 [] selectedFields selectedExps |
347 val sql_forget_tables : tables ::: {{Type}} -> selectedFields ::: {{Type}} -> selectedExps ::: {Type} | 358 val sql_forget_tables : tables ::: {{Type}} -> selectedFields ::: {{Type}} -> selectedExps ::: {Type} |
348 -> sql_query1 tables selectedFields selectedExps | 359 -> sql_query1 tables selectedFields selectedExps |
349 -> sql_query1 selectedFields selectedFields selectedExps | 360 -> sql_query1 [] selectedFields selectedExps |
350 | 361 |
351 type sql_direction | 362 type sql_direction |
352 val sql_asc : sql_direction | 363 val sql_asc : sql_direction |
353 val sql_desc : sql_direction | 364 val sql_desc : sql_direction |
354 | 365 |