summaryrefslogtreecommitdiff
path: root/src/settings.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-30 15:45:10 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-30 15:45:10 -0400
commit250b14e52266e00382447f202c8fd2195b431421 (patch)
treeccb42c49cdb4b1963ad490452f92998a124f7d7c /src/settings.sml
parent3daf3393e53937e9ea2b1e308e5ebd05ffa35a5a (diff)
Move all DBMS initialization to #init
Diffstat (limited to 'src/settings.sml')
-rw-r--r--src/settings.sml28
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}