comparison src/prepare.sml @ 879:b2a175a0f2ef

Demo working with MySQL
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Jul 2009 18:10:29 -0400
parents a8952047e1d3
children 467285bb5578
comparison
equal deleted inserted replaced
878:a8952047e1d3 879:b2a175a0f2ef
197 let 197 let
198 val s = String.concat (rev ss) 198 val s = String.concat (rev ss)
199 in 199 in
200 ((EQuery {exps = exps, tables = tables, rnum = rnum, 200 ((EQuery {exps = exps, tables = tables, rnum = rnum,
201 state = state, query = query, body = body, 201 state = state, query = query, body = body,
202 initial = initial, prepared = SOME (#2 sns, s)}, loc), 202 initial = initial, prepared = SOME {id = #2 sns, query = s, nested = true}}, loc),
203 ((s, n) :: #1 sns, #2 sns + 1)) 203 ((s, n) :: #1 sns, #2 sns + 1))
204 end 204 end
205 end 205 end
206 206
207 | EDml {dml, ...} => 207 | EDml {dml, ...} =>
209 NONE => (e, sns) 209 NONE => (e, sns)
210 | SOME (ss, n) => 210 | SOME (ss, n) =>
211 let 211 let
212 val s = String.concat (rev ss) 212 val s = String.concat (rev ss)
213 in 213 in
214 ((EDml {dml = dml, prepared = SOME (#2 sns, s)}, loc), 214 ((EDml {dml = dml, prepared = SOME {id = #2 sns, dml = s}}, loc),
215 ((s, n) :: #1 sns, #2 sns + 1)) 215 ((s, n) :: #1 sns, #2 sns + 1))
216 end) 216 end)
217 217
218 | ENextval {seq, ...} => 218 | ENextval {seq, ...} =>
219 if #supportsNextval (Settings.currentDbms ()) then 219 if #supportsNextval (Settings.currentDbms ()) then
232 NONE => (e, sns) 232 NONE => (e, sns)
233 | SOME (ss, n) => 233 | SOME (ss, n) =>
234 let 234 let
235 val s = String.concat (rev ss) 235 val s = String.concat (rev ss)
236 in 236 in
237 ((ENextval {seq = seq, prepared = SOME (#2 sns, s)}, loc), 237 ((ENextval {seq = seq, prepared = SOME {id = #2 sns, query = s}}, loc),
238 ((s, n) :: #1 sns, #2 sns + 1)) 238 ((s, n) :: #1 sns, #2 sns + 1))
239 end 239 end
240 end 240 end
241 else 241 else
242 (e, sns) 242 (e, sns)