Mercurial > urweb
comparison src/settings.sig @ 867:e7f80d78075b
Moved query code into Settings
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 28 Jun 2009 16:03:00 -0400 |
parents | 03e7f111fe99 |
children | 06497beb265b |
comparison
equal
deleted
inserted
replaced
866:03e7f111fe99 | 867:e7f80d78075b |
---|---|
99 val addProtocol : protocol -> unit | 99 val addProtocol : protocol -> unit |
100 val setProtocol : string -> unit | 100 val setProtocol : string -> unit |
101 val currentProtocol : unit -> protocol | 101 val currentProtocol : unit -> protocol |
102 | 102 |
103 (* Different DBMSes *) | 103 (* Different DBMSes *) |
104 datatype sql_type = | |
105 Int | |
106 | Float | |
107 | String | |
108 | Bool | |
109 | Time | |
110 | Blob | |
111 | Channel | |
112 | Client | |
113 | Nullable of sql_type | |
114 | |
115 val p_sql_type : sql_type -> Print.PD.pp_desc | |
116 val isBlob : sql_type -> bool | |
117 | |
104 type dbms = { | 118 type dbms = { |
105 name : string, | 119 name : string, |
106 (* Call it this on the command line *) | 120 (* Call it this on the command line *) |
107 header : string, | 121 header : string, |
108 (* Include this C header file *) | 122 (* Include this C header file *) |
109 link : string, | 123 link : string, |
110 (* Pass these linker arguments *) | 124 (* Pass these linker arguments *) |
111 global_init : Print.PD.pp_desc, | 125 global_init : Print.PD.pp_desc, |
112 (* Define uw_client_init() *) | 126 (* Define uw_client_init() *) |
113 init : string * (string * int) list -> Print.PD.pp_desc | 127 init : string * (string * int) list -> Print.PD.pp_desc, |
114 (* Define uw_db_init() from dbstring and prepared statements *) | 128 (* Define uw_db_init(), uw_db_close(), uw_db_begin(), uw_db_commit(), and uw_db_rollback() |
129 * from dbstring and prepared statements *) | |
130 query : {loc : ErrorMsg.span, numCols : int, | |
131 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | |
132 -> Print.PD.pp_desc} | |
133 -> Print.PD.pp_desc, | |
134 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, | |
135 inputs : sql_type list, numCols : int, | |
136 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | |
137 -> Print.PD.pp_desc} | |
138 -> Print.PD.pp_desc | |
115 } | 139 } |
116 | 140 |
117 val addDbms : dbms -> unit | 141 val addDbms : dbms -> unit |
118 val setDbms : string -> unit | 142 val setDbms : string -> unit |
119 val currentDbms : unit -> dbms | 143 val currentDbms : unit -> dbms |