Mercurial > meta
comparison sql.urs @ 16:959583692166
Reorder arguments for better partial application
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 11 Dec 2011 14:44:18 -0500 |
parents | 6ebc2ca594b7 |
children | 875221eee987 |
comparison
equal
deleted
inserted
replaced
15:6ebc2ca594b7 | 16:959583692166 |
---|---|
16 -> sql_exp [tn1 = ofs1 ++ fs, tn2 = ofs2 ++ fs] [] [] bool | 16 -> sql_exp [tn1 = ofs1 ++ fs, tn2 = ofs2 ++ fs] [] [] bool |
17 (* Declare equality of same-named columns from two tables. *) | 17 (* Declare equality of same-named columns from two tables. *) |
18 | 18 |
19 val insertIfMissing : keyCols ::: {Type} -> otherCols ::: {Type} -> otherKeys ::: {{Unit}} | 19 val insertIfMissing : keyCols ::: {Type} -> otherCols ::: {Type} -> otherKeys ::: {{Unit}} |
20 -> [keyCols ~ otherCols] => [[Pkey] ~ otherKeys] | 20 -> [keyCols ~ otherCols] => [[Pkey] ~ otherKeys] |
21 => sql_table (keyCols ++ otherCols) ([Pkey = map (fn _ => ()) keyCols] ++ otherKeys) | 21 => folder keyCols -> $(map sql_injectable keyCols) |
22 -> folder otherCols -> $(map sql_injectable otherCols) | |
23 -> sql_table (keyCols ++ otherCols) ([Pkey = map (fn _ => ()) keyCols] ++ otherKeys) | |
22 -> $(keyCols ++ otherCols) | 24 -> $(keyCols ++ otherCols) |
23 -> folder keyCols -> $(map sql_injectable keyCols) | |
24 -> folder otherCols -> $(map sql_injectable otherCols) | |
25 -> transaction bool | 25 -> transaction bool |
26 (* Insert a row into an SQL table if its key isn't already present, returning [False] iff the key was already present *) | 26 (* Insert a row into an SQL table if its key isn't already present, returning [False] iff the key was already present *) |
27 | 27 |
28 val deleteByKey : keyCols ::: {Type} -> otherCols ::: {Type} -> otherKeys ::: {{Unit}} | 28 val deleteByKey : keyCols ::: {Type} -> otherCols ::: {Type} -> otherKeys ::: {{Unit}} |
29 -> [keyCols ~ otherCols] => [[Pkey] ~ otherKeys] | 29 -> [keyCols ~ otherCols] => [[Pkey] ~ otherKeys] |
30 => sql_table (keyCols ++ otherCols) ([Pkey = map (fn _ => ()) keyCols] ++ otherKeys) | 30 => folder keyCols -> $(map sql_injectable keyCols) |
31 -> $keyCols -> folder keyCols -> $(map sql_injectable keyCols) | 31 -> sql_table (keyCols ++ otherCols) ([Pkey = map (fn _ => ()) keyCols] ++ otherKeys) |
32 -> $keyCols | |
32 -> transaction {} | 33 -> transaction {} |
33 (* Delete a row from a table by matching its primary key against a given record. *) | 34 (* Delete a row from a table by matching its primary key against a given record. *) |