diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-06-30 15:45:10 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-06-30 15:45:10 -0400 |
commit | b731727df078c7295aff5309460fb93a2e51c8e5 (patch) | |
tree | ccb42c49cdb4b1963ad490452f92998a124f7d7c /src/settings.sml | |
parent | cc1ee568ed458ba1e693074d0dad9a27235b7963 (diff) |
Move all DBMS initialization to #init
Diffstat (limited to 'src/settings.sml')
-rw-r--r-- | src/settings.sml | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/settings.sml b/src/settings.sml index 8ad1d3f6..dbc3bf77 100644 --- a/src/settings.sml +++ b/src/settings.sml @@ -291,28 +291,34 @@ fun p_sql_type t = 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} |