diff 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
line wrap: on
line diff
--- a/src/settings.sml	Tue Jun 30 16:17:32 2009 -0400
+++ b/src/settings.sml	Sun Jul 12 13:16:05 2009 -0400
@@ -285,7 +285,7 @@
        | Client
        | Nullable of sql_type
 
-fun p_sql_type t =
+fun p_sql_ctype t =
     let
         open Print.PD
         open Print
@@ -300,7 +300,7 @@
           | Channel => "uw_Basis_channel"
           | Client => "uw_Basis_client"
           | Nullable String => "uw_Basis_string"
-          | Nullable t => p_sql_type t ^ "*"
+          | Nullable t => p_sql_ctype t ^ "*"
     end
 
 fun isBlob Blob = true
@@ -315,17 +315,18 @@
      header : string,
      link : string,
      global_init : Print.PD.pp_desc,
+     p_sql_type : sql_type -> string,
      init : {dbstring : string,
              prepared : (string * int) list,
              tables : (string * (string * sql_type) list) list,
              views : (string * (string * sql_type) list) list,
              sequences : string list} -> Print.PD.pp_desc,
-     query : {loc : ErrorMsg.span, numCols : int,
+     query : {loc : ErrorMsg.span, cols : sql_type list,
               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,
+                      inputs : sql_type list, cols : sql_type list,
                       doCols : ({wontLeakStrings : bool, col : int, typ : sql_type} -> Print.PD.pp_desc)
                                -> Print.PD.pp_desc}
                      -> Print.PD.pp_desc,
@@ -341,6 +342,7 @@
                   header = "",
                   link = "",
                   global_init = Print.box [],
+                  p_sql_type = fn _ => "",
                   init = fn _ => Print.box [],
                   query = fn _ => Print.box [],
                   queryPrepared = fn _ => Print.box [],