comparison lib/basis.urs @ 299:5f6a60b7ab00

Elaborated 'insert'
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 13:47:10 -0400
parents 6e665c7c96f6
children cde1ec47f3af
comparison
equal deleted inserted replaced
298:43f35291433d 299:5f6a60b7ab00
194 -> ($(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables) 194 -> ($(exps ++ fold (fn nm (fields :: {Type}) acc => [nm] ~ acc => [nm = $fields] ++ acc) [] tables)
195 -> state 195 -> state
196 -> transaction state) 196 -> transaction state)
197 -> state 197 -> state
198 -> transaction state 198 -> transaction state
199
200
201 (*** Database mutators *)
202
203 type dml
204 val dml : dml -> transaction unit
205
206 val insert : fields ::: {Type}
207 -> sql_table fields
208 -> $fields
209 -> dml
210
211 val update : changed ::: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
212 -> sql_table (changed ++ unchanged)
213 -> $changed
214 -> sql_exp [T = changed ++ unchanged] [] [] bool
215 -> dml
216
217 val delete : fields ::: {Type}
218 -> sql_table fields
219 -> sql_exp [T = fields] [] [] bool
220 -> dml
199 221
200 222
201 (** XML *) 223 (** XML *)
202 224
203 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type 225 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type