Mercurial > urweb
diff src/settings.sml @ 870:7fa9a37a34b3
Move all DBMS initialization to #init
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 30 Jun 2009 15:45:10 -0400 |
parents | 64ba57fa20bf |
children | 9654bce27cff |
line wrap: on
line diff
--- a/src/settings.sml Sun Jun 28 16:41:10 2009 -0400 +++ b/src/settings.sml Tue Jun 30 15:45:10 2009 -0400 @@ -291,28 +291,34 @@ open Print in case t of - Int => string "uw_Basis_int" - | Float => string "uw_Basis_float" - | String => string "uw_Basis_string" - | Bool => string "uw_Basis_bool" - | Time => string "uw_Basis_time" - | Blob => string "uw_Basis_blob" - | Channel => string "uw_Basis_channel" - | Client => string "uw_Basis_client" - | Nullable String => string "uw_Basis_string" - | Nullable t => box [p_sql_type t, string "*"] + Int => "uw_Basis_int" + | Float => "uw_Basis_float" + | String => "uw_Basis_string" + | Bool => "uw_Basis_bool" + | Time => "uw_Basis_time" + | Blob => "uw_Basis_blob" + | Channel => "uw_Basis_channel" + | Client => "uw_Basis_client" + | Nullable String => "uw_Basis_string" + | Nullable t => p_sql_type t ^ "*" end fun isBlob Blob = true | isBlob (Nullable t) = isBlob t | isBlob _ = false +fun isNotNull (Nullable _) = false + | isNotNull _ = true + type dbms = { name : string, header : string, link : string, global_init : Print.PD.pp_desc, - init : string * (string * int) list -> Print.PD.pp_desc, + init : {dbstring : string, + prepared : (string * int) list, + tables : (string * (string * sql_type) list) list, + sequences : string list} -> Print.PD.pp_desc, query : {loc : ErrorMsg.span, numCols : int, doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) -> Print.PD.pp_desc}