class data_base :string -> string -> string ->
object
..end
SQL_Error
if an error occured during the connection to the
database.method connect : unit -> unit
method disconnect : unit -> unit
SQL_Error
if an error occurs while disconnecting.method execute : string -> int * string option list list
#execute q
executes query q
and returns the result as a pair
(error_code, recordlist)
, where a record is a string
list
. The error_code
is 0 if no error occured.method execute_with_info : string ->
int * (string * sql_column_type) list * string option list list
#execute_with_info q
executes query q
and returns the result
as a tuple (error_code, type_list, record list)
, where
type_list
indicates the SQL types of the returned columns, and
a record is a string list
.
The error_code
is 0 if no error occured.
method execute_gen : ?get_info:bool ->
?n_rec:int ->
string ->
(string option list list -> unit) ->
int * (string * sql_column_type) list
#execute_gen get_info n_rec q callback
executes query q
and
invokes callback
on successful blocks of the results (of
n_rec
records each). Each record is a string list
of fields.
The result is a tuple (error_code, type_list)
. The
error_code
is 0 if no error occurred, type_list
is empty if
get_info
is false
.