comparison lib/basis.urs @ 342:f55034419a07

Crud completed
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 19:14:40 -0400
parents 389399d65331
children b85e6ba56618
comparison
equal deleted inserted replaced
341:389399d65331 342:f55034419a07
204 val dml : dml -> transaction unit 204 val dml : dml -> transaction unit
205 205
206 val insert : fields ::: {Type} 206 val insert : fields ::: {Type}
207 -> sql_table fields 207 -> sql_table fields
208 -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc => 208 -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
209 [nm = sql_exp [T = fields] [] [] t] ++ acc) [] fields) 209 [nm = sql_exp [] [] [] t] ++ acc) [] fields)
210 -> dml 210 -> dml
211 211
212 val update : changed ::: {Type} -> unchanged ::: {Type} -> changed ~ unchanged 212 val update : changed :: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
213 -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc => 213 -> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
214 [nm = sql_exp [T = changed ++ unchanged] [] [] t] ++ acc) [] changed) 214 [nm = sql_exp [T = changed ++ unchanged] [] [] t] ++ acc) [] changed)
215 -> sql_table (changed ++ unchanged) 215 -> sql_table (changed ++ unchanged)
216 -> sql_exp [T = changed ++ unchanged] [] [] bool 216 -> sql_exp [T = changed ++ unchanged] [] [] bool
217 -> dml 217 -> dml