sig
type 'a t
exception Error of string
exception PostgreSQL_Error of string * (char * string) list
val connect :
?host:string ->
?port:int ->
?user:string ->
?password:string ->
?database:string ->
?unix_domain_socket_dir:string -> unit -> 'a PGOCaml.t
val close : 'a PGOCaml.t -> unit
val ping : 'a PGOCaml.t -> unit
val begin_work : 'a PGOCaml.t -> unit
val commit : 'a PGOCaml.t -> unit
val rollback : 'a PGOCaml.t -> unit
val serial : 'a PGOCaml.t -> string -> int64
val serial4 : 'a PGOCaml.t -> string -> int32
val serial8 : 'a PGOCaml.t -> string -> int64
val max_message_length : int Pervasives.ref
val verbose : int Pervasives.ref
val set_private_data : 'a PGOCaml.t -> 'a -> unit
val private_data : 'a PGOCaml.t -> 'a
type pa_pg_data = (string, bool) Hashtbl.t
type oid = int32
type param = string option
type result = string option
type row = PGOCaml.result list
val prepare :
'a PGOCaml.t ->
query:string -> ?name:string -> ?types:PGOCaml.oid list -> unit -> unit
val execute :
'a PGOCaml.t ->
?name:string ->
?portal:string -> params:PGOCaml.param list -> unit -> PGOCaml.row list
val close_statement : 'a PGOCaml.t -> ?name:string -> unit -> unit
val close_portal : 'a PGOCaml.t -> ?portal:string -> unit -> unit
type row_description = PGOCaml.result_description list
and result_description = {
name : string;
table : PGOCaml.oid option;
column : int option;
field_type : PGOCaml.oid;
length : int;
modifier : int32;
}
type params_description = PGOCaml.param_description list
and param_description = { param_type : PGOCaml.oid; }
val describe_statement :
'a PGOCaml.t ->
?name:string ->
unit -> PGOCaml.params_description * PGOCaml.row_description option
val describe_portal :
'a PGOCaml.t -> ?portal:string -> unit -> PGOCaml.row_description option
val name_of_type : ?modifier:int32 -> PGOCaml.oid -> string
type timestamptz = Calendar.t * Time_Zone.t
type int16 = int
type bytea = string
type int32_array = int32 array
val string_of_oid : PGOCaml.oid -> string
val string_of_bool : bool -> string
val string_of_int : int -> string
val string_of_int16 : PGOCaml.int16 -> string
val string_of_int32 : int32 -> string
val string_of_int64 : int64 -> string
val string_of_float : float -> string
val string_of_timestamp : Calendar.t -> string
val string_of_timestamptz : PGOCaml.timestamptz -> string
val string_of_date : Date.t -> string
val string_of_time : Time.t -> string
val string_of_interval : Calendar.Period.t -> string
val string_of_int32_array : PGOCaml.int32_array -> string
val string_of_bytea : PGOCaml.bytea -> string
val string_of_string : string -> string
val string_of_unit : unit -> string
val bool_of_string : string -> bool
val int_of_string : string -> int
val int16_of_string : string -> PGOCaml.int16
val int32_of_string : string -> int32
val int64_of_string : string -> int64
val float_of_string : string -> float
val timestamp_of_string : string -> Calendar.t
val timestamptz_of_string : string -> PGOCaml.timestamptz
val date_of_string : string -> Date.t
val time_of_string : string -> Time.t
val interval_of_string : string -> Calendar.Period.t
val int32_array_of_string : string -> PGOCaml.int32_array
val bytea_of_string : string -> PGOCaml.bytea
val unit_of_string : string -> unit
end