summaryrefslogtreecommitdiff
path: root/src/settings.sig
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-28 16:03:00 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-28 16:03:00 -0400
commitcc79a0b5321ef71d4e1e3aaeb0f33afcb08e974b (patch)
tree9fcbf80505ddc3a6e4b3a26a0b2f6218132dfa80 /src/settings.sig
parent5c154f05f5e4735d999927925a771b3a21f5a22d (diff)
Moved query code into Settings
Diffstat (limited to 'src/settings.sig')
-rw-r--r--src/settings.sig28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/settings.sig b/src/settings.sig
index 215839a1..536f6a1f 100644
--- a/src/settings.sig
+++ b/src/settings.sig
@@ -101,6 +101,20 @@ signature SETTINGS = sig
val currentProtocol : unit -> protocol
(* Different DBMSes *)
+ datatype sql_type =
+ Int
+ | Float
+ | String
+ | Bool
+ | Time
+ | Blob
+ | Channel
+ | Client
+ | Nullable of sql_type
+
+ val p_sql_type : sql_type -> Print.PD.pp_desc
+ val isBlob : sql_type -> bool
+
type dbms = {
name : string,
(* Call it this on the command line *)
@@ -110,8 +124,18 @@ signature SETTINGS = sig
(* Pass these linker arguments *)
global_init : Print.PD.pp_desc,
(* Define uw_client_init() *)
- init : string * (string * int) list -> Print.PD.pp_desc
- (* Define uw_db_init() from dbstring and prepared statements *)
+ init : string * (string * int) list -> Print.PD.pp_desc,
+ (* Define uw_db_init(), uw_db_close(), uw_db_begin(), uw_db_commit(), and uw_db_rollback()
+ * from dbstring and prepared statements *)
+ query : {loc : ErrorMsg.span, numCols : int,
+ doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc)
+ -> Print.PD.pp_desc}
+ -> Print.PD.pp_desc,
+ queryPrepared : {loc : ErrorMsg.span, id : int, query : string,
+ inputs : sql_type list, numCols : int,
+ doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc)
+ -> Print.PD.pp_desc}
+ -> Print.PD.pp_desc
}
val addDbms : dbms -> unit