sig
type arg_t =
[ `Bool of bool
| `BoolOption of bool option
| `Int of int
| `IntOption of int option
| `Interval of Dbi.interval_t
| `IntervalOption of Dbi.interval_t option
| `Null
| `Numeric of float
| `NumericOption of float option
| `String of string
| `StringOption of string option
| `Timestamp of Dbi.timestamp_t
| `TimestampOption of Dbi.timestamp_t option ]
and timestamp_t = {
ts_is_null : bool;
ts_year : int;
ts_month : int;
ts_day : int;
ts_hour : int;
ts_min : int;
ts_sec : int;
ts_microsecs : int;
ts_utc_offset : int;
}
and interval_t = {
iv_is_null : bool;
iv_years : int;
iv_months : int;
iv_days : int;
iv_hours : int;
iv_mins : int;
iv_secs : int;
iv_microsecs : int;
}
val null_timestamp : Dbi.timestamp_t
val null_interval : Dbi.interval_t
type ref_t =
[ `IntOptionRef of int option Pervasives.ref
| `IntRef of int Pervasives.ref
| `NumericOptionRef of float option Pervasives.ref
| `NumericRef of float Pervasives.ref
| `StringOptionRef of string option Pervasives.ref
| `StringRef of string Pervasives.ref ]
and precommit_handle
and postrollback_handle
exception SQL_error of string
class virtual statement :
Dbi.connection ->
object
method virtual bind_columns : Dbi.ref_t list -> unit
method connection : Dbi.connection
method virtual execute : Dbi.arg_t list -> unit
method virtual fetch1 : string array
method fetchall : string array list
method finish : unit
method fold_left : ('a -> string array -> 'a) -> 'a -> 'a
method fold_right : (string array -> 'b -> 'b) -> 'b -> 'b
method iter : (string array -> unit) -> unit
method map : (string array -> 'c) -> 'c list
method virtual next : bool
method virtual serial : string -> int
end
class virtual connection :
?host:string ->
?port:string ->
?user:string ->
?password:string ->
string ->
object
val mutable closed : bool
method close : unit
method closed : bool
method commit : unit
method database : string
method virtual database_type : string
method debug : bool
method ex : string -> Dbi.arg_t list -> Dbi.statement
method host : string option
method id : int
method password : string option
method ping : bool
method port : string option
method virtual prepare : string -> Dbi.statement
method prepare_cached : string -> Dbi.statement
method register_postrollback :
(unit -> unit) -> Dbi.postrollback_handle
method register_precommit : (unit -> unit) -> Dbi.precommit_handle
method rollback : unit
method set_debug : bool -> unit
method unregister_postrollback : Dbi.postrollback_handle -> unit
method unregister_precommit : Dbi.precommit_handle -> unit
method user : string option
end
module Factory :
sig
val connect :
string ->
?host:string ->
?port:string ->
?user:string -> ?password:string -> string -> Dbi.connection
val database_types : unit -> string list
val register :
string ->
(?host:string ->
?port:string ->
?user:string -> ?password:string -> string -> Dbi.connection) ->
unit
end
end