sig
type t
type status = Ok | Bad
external connect : string -> Postgres.Connection.t = "stub_PQconnectdb"
external is_null : Postgres.Connection.t -> bool = "conn_isnull"
external finish : Postgres.Connection.t -> unit = "stub_PQfinish"
external reset : Postgres.Connection.t -> unit = "stub_PQreset"
external db : Postgres.Connection.t -> string = "stub_PQdb"
external user : Postgres.Connection.t -> string = "stub_PQuser"
external pass : Postgres.Connection.t -> string = "stub_PQpass"
external host : Postgres.Connection.t -> string = "stub_PQhost"
external port : Postgres.Connection.t -> string = "stub_PQport"
external tty : Postgres.Connection.t -> string = "stub_PQtty"
external options : Postgres.Connection.t -> string = "stub_PQoptions"
external status : Postgres.Connection.t -> Postgres.Connection.status
= "stub_PQstatus"
external error_message : Postgres.Connection.t -> string
= "stub_PQerrorMessage"
external backend_pid : Postgres.Connection.t -> int = "stub_PQbackendPID"
external notifies : Postgres.Connection.t -> (string * int) option
= "stub_PQnotifies"
external set_notice_processor :
Postgres.Connection.t -> (string -> unit) -> unit
= "stub_PQsetNoticeProcessor"
external set_nonblocking : Postgres.Connection.t -> bool -> int
= "stub_PQsetnonblocking"
external is_nonblocking : Postgres.Connection.t -> bool
= "stub_PQisnonblocking"
external consume_input : Postgres.Connection.t -> int
= "stub_PQconsumeInput"
external is_busy : Postgres.Connection.t -> bool = "stub_PQisBusy"
external flush : Postgres.Connection.t -> int = "stub_PQflush"
external socket : Postgres.Connection.t -> int = "stub_PQsocket"
external request_cancel : Postgres.Connection.t -> int
= "stub_PQrequestCancel"
external getline : Postgres.Connection.t -> string -> int -> int -> int
= "stub_PQgetline"
external getline_async :
Postgres.Connection.t -> string -> int -> int -> int
= "stub_PQgetlineAsync"
external putline : Postgres.Connection.t -> string -> int
= "stub_PQputline"
external putnbytes : Postgres.Connection.t -> string -> int -> int -> int
= "stub_PQputnbytes"
external endcopy : Postgres.Connection.t -> int = "stub_PQendcopy"
external exec : Postgres.Connection.t -> string -> Postgres.Result.t
= "stub_PQexec"
external send_query : Postgres.Connection.t -> string -> int
= "stub_PQsendQuery"
external get_result : Postgres.Connection.t -> Postgres.Result.t
= "stub_PQgetResult"
external make_empty :
Postgres.Connection.t -> Postgres.Result.status -> Postgres.Result.t
= "stub_PQmakeEmptyPGresult"
end