Postgresql

`sig type oid = int type large_object module FFormat : sig type t = TEXT | BINARY end type ftype = BOOL | BYTEA | CHAR | NAME | INT8 | INT2 | INT2VECTOR | INT4 | REGPROC | TEXT | OID | TID | XID | CID | OIDVECTOR | JSON | POINT | LSEG | PATH | BOX | POLYGON | LINE | FLOAT4 | FLOAT8 | ABSTIME | RELTIME | TINTERVAL | UNKNOWN | CIRCLE | CASH | MACADDR | INET | CIDR | ACLITEM | BPCHAR | VARCHAR | DATE | TIME | TIMESTAMP | TIMESTAMPTZ | INTERVAL | TIMETZ | BIT | VARBIT | NUMERIC | REFCURSOR | REGPROCEDURE | REGOPER | REGOPERATOR | REGCLASS | REGTYPE | RECORD | CSTRING | ANY | ANYARRAY | VOID | TRIGGER | LANGUAGE_HANDLER | INTERNAL | OPAQUE | ANYELEMENT | JSONB type result_status = Empty_query | Command_ok | Tuples_ok | Copy_out | Copy_in | Bad_response | Nonfatal_error | Fatal_error | Copy_both | Single_tuple type getline_result = EOF | LineRead | BufFull type getline_async_result = EndOfData | NoData | DataRead of int | PartDataRead of int type seek_cmd = SEEK_SET | SEEK_CUR | SEEK_END type error = Field_out_of_range of int * int | Tuple_out_of_range of int * int | Binary | Connection_failure of string | Unexpected_status of Postgresql.result_status * string * Postgresql.result_status list | Cancel_failure of string exception Error of Postgresql.error val string_of_error : Postgresql.error -> string exception Oid of Postgresql.oid val unescape_bytea : string -> string external ftype_of_oid : Postgresql.oid -> Postgresql.ftype = "ftype_of_oid_stub" external oid_of_ftype : Postgresql.ftype -> Postgresql.oid = "oid_of_ftype_stub" val string_of_ftype : Postgresql.ftype -> string val ftype_of_string : string -> Postgresql.ftype external result_status : Postgresql.result_status -> string = "PQresStatus_stub" val invalid_oid : Postgresql.oid val null : string class type result = object method binary_tuples : bool method cmd_status : string method cmd_tuples : string method error : string method fformat : int -> Postgresql.FFormat.t method fmod : int -> int method fname : int -> string method fnumber : string -> int method fsize : int -> int method ftype : int -> Postgresql.ftype method ftype_oid : int -> Postgresql.oid method get_all : string array array method get_all_lst : string list list method get_escaped_value : int -> int -> string method get_fnames : string array method get_fnames_lst : string list method get_tuple : int -> string array method get_tuple_lst : int -> string list method getisnull : int -> int -> bool method getlength : int -> int -> int method getvalue : int -> int -> string method nfields : int method nparams : int method ntuples : int method oid_value : Postgresql.oid method paramtype : int -> Postgresql.ftype method paramtype_oid : int -> Postgresql.oid method status : Postgresql.result_status end type connection_status = Ok | Bad | Connection_started | Connection_made | Connection_awaiting_response | Connection_auth_ok | Connection_setenv | Connection_ssl_startup type polling_status = Polling_failed | Polling_reading | Polling_writing | Polling_ok type flush_status = Successful | Data_left_to_send type conninfo_option = { cio_keyword : string; cio_envvar : string option; cio_compiled : string option; cio_val : string option; cio_label : string; cio_dispchar : string; cio_dispsize : int; } external conndefaults : unit -> Postgresql.conninfo_option array = "PQconndefaults_stub" class connection : ?host:string -> ?hostaddr:string -> ?port:string -> ?dbname:string -> ?user:string -> ?password:string -> ?options:string -> ?tty:string -> ?requiressl:string -> ?conninfo:string -> ?startonly:bool -> unit -> object method backend_pid : int method connect_poll : Postgresql.polling_status method consume_input : unit method copy_in_channel : Pervasives.in_channel -> unit method copy_out : (string -> unit) -> unit method copy_out_channel : Pervasives.out_channel -> unit method db : string method describe_prepared : string -> Postgresql.result method empty_result : Postgresql.result_status -> Postgresql.result method endcopy : unit method error_message : string method escape_bytea : ?pos:int -> ?len:int -> string -> string method escape_string : ?pos:int -> ?len:int -> string -> string method exec : ?expect:Postgresql.result_status list -> ?params:string array -> ?binary_params:bool array -> string -> Postgresql.result method exec_prepared : ?expect:Postgresql.result_status list -> ?params:string array -> ?binary_params:bool array -> string -> Postgresql.result method finish : unit method flush : Postgresql.flush_status method get_result : Postgresql.result option method getline : ?pos:int -> ?len:int -> Bytes.t -> Postgresql.getline_result method getline_async : ?pos:int -> ?len:int -> Bytes.t -> Postgresql.getline_async_result method host : string method is_busy : bool method is_nonblocking : bool method lo_close : Postgresql.large_object -> unit method lo_creat : Postgresql.oid method lo_export : Postgresql.oid -> string -> unit method lo_import : string -> Postgresql.oid method lo_open : Postgresql.oid -> Postgresql.large_object method lo_read : Postgresql.large_object -> ?pos:int -> ?len:int -> Bytes.t -> int method lo_read_ba : Postgresql.large_object -> ?pos:int -> ?len:int -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> int method lo_seek : ?pos:int -> ?whence:Postgresql.seek_cmd -> Postgresql.large_object -> unit method lo_tell : Postgresql.large_object -> int method lo_unlink : Postgresql.oid -> unit method lo_write : ?pos:int -> ?len:int -> string -> Postgresql.large_object -> unit method lo_write_ba : ?pos:int -> ?len:int -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> Postgresql.large_object -> unit method notifies : (string * int) option method options : string method pass : string method port : string method prepare : string -> string -> Postgresql.result method putline : string -> unit method putnbytes : ?pos:int -> ?len:int -> string -> unit method request_cancel : unit method reset : unit method reset_poll : Postgresql.polling_status method reset_start : bool method send_describe_portal : string -> unit method send_describe_prepared : string -> unit method send_prepare : string -> string -> unit method send_query : ?params:string array -> ?binary_params:bool array -> string -> unit method send_query_prepared : ?params:string array -> ?binary_params:bool array -> string -> unit method server_version : int * int * int method set_nonblocking : bool -> unit method set_notice_processor : (string -> unit) -> unit method set_single_row_mode : unit method socket : int method status : Postgresql.connection_status method try_reset : unit method tty : string method user : string end end`