exception Sql of string
(* All-purpose exception *)
+ type value
+ (* One value in a query result *)
+
val conn : string -> conn
(* Connect to a server based on a string of information *)
val close : conn -> unit
(* Close a connection *)
val dml : conn -> string -> string
(* Execute a DML command over a connection, returning a result message *)
- val fold : conn -> (string list * 'a -> 'a) -> 'a -> string -> 'a
+ val fold : conn -> (value list * 'a -> 'a) -> 'a -> string -> 'a
(* Behaves like List.foldl, applied over the result rows of a query *)
type timestamp = Time.time
exception Format of string
(* Conversions between SML values and their string representations from SQL queries *)
+ val isNull : value -> bool
val intToSql : int -> string
- val intFromSql : string -> int
+ val intFromSql : value -> int
val stringToSql : string -> string
- val stringFromSql : string -> string
+ val stringFromSql : value -> string
val timestampToSql : timestamp -> string
- val timestampFromSql : string -> timestamp
+ val timestampToSqlUnquoted : timestamp -> string
+ val timestampFromSql : value -> timestamp
val realToSql : real -> string
- val realFromSql : string -> real
+ val realFromSql : value -> real
val boolToSql : bool -> string
- val boolFromSql : string -> bool
+ val boolFromSql : value -> bool
end