Mercurial > urweb
comparison src/settings.sml @ 869:64ba57fa20bf
Moved nextval code into Settings
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 28 Jun 2009 16:41:10 -0400 |
parents | 06497beb265b |
children | 7fa9a37a34b3 |
comparison
equal
deleted
inserted
replaced
868:06497beb265b | 869:64ba57fa20bf |
---|---|
322 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | 322 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) |
323 -> Print.PD.pp_desc} | 323 -> Print.PD.pp_desc} |
324 -> Print.PD.pp_desc, | 324 -> Print.PD.pp_desc, |
325 dml : ErrorMsg.span -> Print.PD.pp_desc, | 325 dml : ErrorMsg.span -> Print.PD.pp_desc, |
326 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, | 326 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, |
327 inputs : sql_type list} -> Print.PD.pp_desc | 327 inputs : sql_type list} -> Print.PD.pp_desc, |
328 nextval : ErrorMsg.span -> Print.PD.pp_desc, | |
329 nextvalPrepared : {loc : ErrorMsg.span, id : int, query : string} -> Print.PD.pp_desc | |
328 } | 330 } |
329 | 331 |
330 val dbmses = ref ([] : dbms list) | 332 val dbmses = ref ([] : dbms list) |
331 val curDb = ref ({name = "", | 333 val curDb = ref ({name = "", |
332 header = "", | 334 header = "", |
334 global_init = Print.box [], | 336 global_init = Print.box [], |
335 init = fn _ => Print.box [], | 337 init = fn _ => Print.box [], |
336 query = fn _ => Print.box [], | 338 query = fn _ => Print.box [], |
337 queryPrepared = fn _ => Print.box [], | 339 queryPrepared = fn _ => Print.box [], |
338 dml = fn _ => Print.box [], | 340 dml = fn _ => Print.box [], |
339 dmlPrepared = fn _ => Print.box []} : dbms) | 341 dmlPrepared = fn _ => Print.box [], |
342 nextval = fn _ => Print.box [], | |
343 nextvalPrepared = fn _ => Print.box []} : dbms) | |
340 | 344 |
341 fun addDbms v = dbmses := v :: !dbmses | 345 fun addDbms v = dbmses := v :: !dbmses |
342 fun setDbms s = | 346 fun setDbms s = |
343 case List.find (fn db => #name db = s) (!dbmses) of | 347 case List.find (fn db => #name db = s) (!dbmses) of |
344 NONE => raise Fail ("Unknown DBMS " ^ s) | 348 NONE => raise Fail ("Unknown DBMS " ^ s) |