Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
869:64ba57fa20bf | 870:7fa9a37a34b3 |
---|---|
289 let | 289 let |
290 open Print.PD | 290 open Print.PD |
291 open Print | 291 open Print |
292 in | 292 in |
293 case t of | 293 case t of |
294 Int => string "uw_Basis_int" | 294 Int => "uw_Basis_int" |
295 | Float => string "uw_Basis_float" | 295 | Float => "uw_Basis_float" |
296 | String => string "uw_Basis_string" | 296 | String => "uw_Basis_string" |
297 | Bool => string "uw_Basis_bool" | 297 | Bool => "uw_Basis_bool" |
298 | Time => string "uw_Basis_time" | 298 | Time => "uw_Basis_time" |
299 | Blob => string "uw_Basis_blob" | 299 | Blob => "uw_Basis_blob" |
300 | Channel => string "uw_Basis_channel" | 300 | Channel => "uw_Basis_channel" |
301 | Client => string "uw_Basis_client" | 301 | Client => "uw_Basis_client" |
302 | Nullable String => string "uw_Basis_string" | 302 | Nullable String => "uw_Basis_string" |
303 | Nullable t => box [p_sql_type t, string "*"] | 303 | Nullable t => p_sql_type t ^ "*" |
304 end | 304 end |
305 | 305 |
306 fun isBlob Blob = true | 306 fun isBlob Blob = true |
307 | isBlob (Nullable t) = isBlob t | 307 | isBlob (Nullable t) = isBlob t |
308 | isBlob _ = false | 308 | isBlob _ = false |
309 | |
310 fun isNotNull (Nullable _) = false | |
311 | isNotNull _ = true | |
309 | 312 |
310 type dbms = { | 313 type dbms = { |
311 name : string, | 314 name : string, |
312 header : string, | 315 header : string, |
313 link : string, | 316 link : string, |
314 global_init : Print.PD.pp_desc, | 317 global_init : Print.PD.pp_desc, |
315 init : string * (string * int) list -> Print.PD.pp_desc, | 318 init : {dbstring : string, |
319 prepared : (string * int) list, | |
320 tables : (string * (string * sql_type) list) list, | |
321 sequences : string list} -> Print.PD.pp_desc, | |
316 query : {loc : ErrorMsg.span, numCols : int, | 322 query : {loc : ErrorMsg.span, numCols : int, |
317 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | 323 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) |
318 -> Print.PD.pp_desc} | 324 -> Print.PD.pp_desc} |
319 -> Print.PD.pp_desc, | 325 -> Print.PD.pp_desc, |
320 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, | 326 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, |