comparison src/settings.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 8e9f2d247dba
comparison
equal deleted inserted replaced
878:a8952047e1d3 879:b2a175a0f2ef
325 -> Print.PD.pp_desc} 325 -> Print.PD.pp_desc}
326 -> Print.PD.pp_desc, 326 -> Print.PD.pp_desc,
327 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, 327 queryPrepared : {loc : ErrorMsg.span, id : int, query : string,
328 inputs : sql_type list, cols : sql_type list, 328 inputs : sql_type list, cols : sql_type list,
329 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) 329 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc)
330 -> Print.PD.pp_desc} 330 -> Print.PD.pp_desc,
331 nested : bool}
331 -> Print.PD.pp_desc, 332 -> Print.PD.pp_desc,
332 dml : ErrorMsg.span -> Print.PD.pp_desc, 333 dml : ErrorMsg.span -> Print.PD.pp_desc,
333 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, 334 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string,
334 inputs : sql_type list} -> Print.PD.pp_desc, 335 inputs : sql_type list} -> Print.PD.pp_desc,
335 nextval : {loc : ErrorMsg.span, seqName : string option, seqE : Print.PD.pp_desc} -> Print.PD.pp_desc, 336 nextval : {loc : ErrorMsg.span, seqName : string option, seqE : Print.PD.pp_desc} -> Print.PD.pp_desc,
338 p_cast : string * sql_type -> string, 339 p_cast : string * sql_type -> string,
339 p_blank : int * sql_type -> string, 340 p_blank : int * sql_type -> string,
340 supportsDeleteAs : bool, 341 supportsDeleteAs : bool,
341 createSequence : string -> string, 342 createSequence : string -> string,
342 textKeysNeedLengths : bool, 343 textKeysNeedLengths : bool,
343 supportsNextval : bool 344 supportsNextval : bool,
345 supportsNestedPrepared : bool
344 } 346 }
345 347
346 val dbmses = ref ([] : dbms list) 348 val dbmses = ref ([] : dbms list)
347 val curDb = ref ({name = "", 349 val curDb = ref ({name = "",
348 header = "", 350 header = "",
359 p_cast = fn _ => "", 361 p_cast = fn _ => "",
360 p_blank = fn _ => "", 362 p_blank = fn _ => "",
361 supportsDeleteAs = false, 363 supportsDeleteAs = false,
362 createSequence = fn _ => "", 364 createSequence = fn _ => "",
363 textKeysNeedLengths = false, 365 textKeysNeedLengths = false,
364 supportsNextval = false} : dbms) 366 supportsNextval = false,
367 supportsNestedPrepared = false} : dbms)
365 368
366 fun addDbms v = dbmses := v :: !dbmses 369 fun addDbms v = dbmses := v :: !dbmses
367 fun setDbms s = 370 fun setDbms s =
368 case List.find (fn db => #name db = s) (!dbmses) of 371 case List.find (fn db => #name db = s) (!dbmses) of
369 NONE => raise Fail ("Unknown DBMS " ^ s) 372 NONE => raise Fail ("Unknown DBMS " ^ s)