Mercurial > urweb
comparison src/settings.sml @ 873:41971801b62d
MySQL query gets up to C linking
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 12 Jul 2009 13:16:05 -0400 |
parents | 9654bce27cff |
children | 3c7b48040dcf |
comparison
equal
deleted
inserted
replaced
872:9654bce27cff | 873:41971801b62d |
---|---|
283 | Blob | 283 | Blob |
284 | Channel | 284 | Channel |
285 | Client | 285 | Client |
286 | Nullable of sql_type | 286 | Nullable of sql_type |
287 | 287 |
288 fun p_sql_type t = | 288 fun p_sql_ctype t = |
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 |
298 | Time => "uw_Basis_time" | 298 | Time => "uw_Basis_time" |
299 | Blob => "uw_Basis_blob" | 299 | Blob => "uw_Basis_blob" |
300 | Channel => "uw_Basis_channel" | 300 | Channel => "uw_Basis_channel" |
301 | Client => "uw_Basis_client" | 301 | Client => "uw_Basis_client" |
302 | Nullable String => "uw_Basis_string" | 302 | Nullable String => "uw_Basis_string" |
303 | Nullable t => p_sql_type t ^ "*" | 303 | Nullable t => p_sql_ctype 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 |
313 type dbms = { | 313 type dbms = { |
314 name : string, | 314 name : string, |
315 header : string, | 315 header : string, |
316 link : string, | 316 link : string, |
317 global_init : Print.PD.pp_desc, | 317 global_init : Print.PD.pp_desc, |
318 p_sql_type : sql_type -> string, | |
318 init : {dbstring : string, | 319 init : {dbstring : string, |
319 prepared : (string * int) list, | 320 prepared : (string * int) list, |
320 tables : (string * (string * sql_type) list) list, | 321 tables : (string * (string * sql_type) list) list, |
321 views : (string * (string * sql_type) list) list, | 322 views : (string * (string * sql_type) list) list, |
322 sequences : string list} -> Print.PD.pp_desc, | 323 sequences : string list} -> Print.PD.pp_desc, |
323 query : {loc : ErrorMsg.span, numCols : int, | 324 query : {loc : ErrorMsg.span, cols : sql_type list, |
324 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | 325 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) |
325 -> Print.PD.pp_desc} | 326 -> Print.PD.pp_desc} |
326 -> Print.PD.pp_desc, | 327 -> Print.PD.pp_desc, |
327 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, | 328 queryPrepared : {loc : ErrorMsg.span, id : int, query : string, |
328 inputs : sql_type list, numCols : int, | 329 inputs : sql_type list, cols : sql_type list, |
329 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) | 330 doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc) |
330 -> Print.PD.pp_desc} | 331 -> Print.PD.pp_desc} |
331 -> Print.PD.pp_desc, | 332 -> Print.PD.pp_desc, |
332 dml : ErrorMsg.span -> Print.PD.pp_desc, | 333 dml : ErrorMsg.span -> Print.PD.pp_desc, |
333 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, | 334 dmlPrepared : {loc : ErrorMsg.span, id : int, dml : string, |
339 val dbmses = ref ([] : dbms list) | 340 val dbmses = ref ([] : dbms list) |
340 val curDb = ref ({name = "", | 341 val curDb = ref ({name = "", |
341 header = "", | 342 header = "", |
342 link = "", | 343 link = "", |
343 global_init = Print.box [], | 344 global_init = Print.box [], |
345 p_sql_type = fn _ => "", | |
344 init = fn _ => Print.box [], | 346 init = fn _ => Print.box [], |
345 query = fn _ => Print.box [], | 347 query = fn _ => Print.box [], |
346 queryPrepared = fn _ => Print.box [], | 348 queryPrepared = fn _ => Print.box [], |
347 dml = fn _ => Print.box [], | 349 dml = fn _ => Print.box [], |
348 dmlPrepared = fn _ => Print.box [], | 350 dmlPrepared = fn _ => Print.box [], |