comparison sql.urs @ 13:d05943db55e8

Sql.joiner
author Adam Chlipala <adam@chlipala.net>
date Mon, 21 Mar 2011 10:16:12 -0400
parents 799f43bce62b
children 6ebc2ca594b7
comparison
equal deleted inserted replaced
12:a6730c3cfea7 13:d05943db55e8
7 val selector : tn :: Name -> fs ::: {Type} -> ofs ::: {Type} -> [fs ~ ofs] 7 val selector : tn :: Name -> fs ::: {Type} -> ofs ::: {Type} -> [fs ~ ofs]
8 => folder fs -> $(map sql_injectable fs) -> $fs 8 => folder fs -> $(map sql_injectable fs) -> $fs
9 -> sql_exp [tn = ofs ++ fs] [] [] bool 9 -> sql_exp [tn = ofs ++ fs] [] [] bool
10 (* Build a boolean SQL expression expressing equality of some fields of a table 10 (* Build a boolean SQL expression expressing equality of some fields of a table
11 * row with a record of Ur values *) 11 * row with a record of Ur values *)
12
13 val joiner : tn1 :: Name -> tn2 :: Name -> fs ::: {Type} -> ofs1 ::: {Type} -> ofs2 ::: {Type}
14 -> [[tn1] ~ [tn2]] => [fs ~ ofs1] => [fs ~ ofs2]
15 => folder fs
16 -> sql_exp [tn1 = ofs1 ++ fs, tn2 = ofs2 ++ fs] [] [] bool
17 (* Declare equality of same-named columns from two tables. *)