comparison src/settings.sml @ 878:a8952047e1d3

Sequence code compiles in MySQL
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Jul 2009 16:29:13 -0400
parents dae141d911d9
children b2a175a0f2ef
comparison
equal deleted inserted replaced
877:dae141d911d9 878:a8952047e1d3
330 -> Print.PD.pp_desc} 330 -> Print.PD.pp_desc}
331 -> Print.PD.pp_desc, 331 -> Print.PD.pp_desc,
332 dml : ErrorMsg.span -> Print.PD.pp_desc, 332 dml : ErrorMsg.span -> Print.PD.pp_desc,
333 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, 333 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string,
334 inputs : sql_type list} -> Print.PD.pp_desc, 334 inputs : sql_type list} -> Print.PD.pp_desc,
335 nextval : ErrorMsg.span -> Print.PD.pp_desc, 335 nextval : {loc : ErrorMsg.span, seqName : string option, seqE : Print.PD.pp_desc} -> Print.PD.pp_desc,
336 nextvalPrepared : {loc : ErrorMsg.span, id : int, query : string} -> Print.PD.pp_desc, 336 nextvalPrepared : {loc : ErrorMsg.span, id : int, query : string} -> Print.PD.pp_desc,
337 sqlifyString : string -> string, 337 sqlifyString : string -> string,
338 p_cast : string * sql_type -> string, 338 p_cast : string * sql_type -> string,
339 p_blank : int * sql_type -> string, 339 p_blank : int * sql_type -> string,
340 supportsDeleteAs : bool, 340 supportsDeleteAs : bool,
341 createSequence : string -> string, 341 createSequence : string -> string,
342 textKeysNeedLengths : bool 342 textKeysNeedLengths : bool,
343 supportsNextval : bool
343 } 344 }
344 345
345 val dbmses = ref ([] : dbms list) 346 val dbmses = ref ([] : dbms list)
346 val curDb = ref ({name = "", 347 val curDb = ref ({name = "",
347 header = "", 348 header = "",
357 sqlifyString = fn s => s, 358 sqlifyString = fn s => s,
358 p_cast = fn _ => "", 359 p_cast = fn _ => "",
359 p_blank = fn _ => "", 360 p_blank = fn _ => "",
360 supportsDeleteAs = false, 361 supportsDeleteAs = false,
361 createSequence = fn _ => "", 362 createSequence = fn _ => "",
362 textKeysNeedLengths = false} : dbms) 363 textKeysNeedLengths = false,
364 supportsNextval = false} : dbms)
363 365
364 fun addDbms v = dbmses := v :: !dbmses 366 fun addDbms v = dbmses := v :: !dbmses
365 fun setDbms s = 367 fun setDbms s =
366 case List.find (fn db => #name db = s) (!dbmses) of 368 case List.find (fn db => #name db = s) (!dbmses) of
367 NONE => raise Fail ("Unknown DBMS " ^ s) 369 NONE => raise Fail ("Unknown DBMS " ^ s)