sig
class type db_config =
object
method db_dbname : string option
method db_host : string option
method db_hostaddr : string option
method db_password : string option
method db_port : string option
method db_ro_connections_max : int
method db_user : string option
end
val dummy_db_config : unit -> Pfs_db.db_config
val extract_db_config : Netplex_types.config_file -> Pfs_db.db_config
class type ['mode] async_connection =
object
method backend_pid : int
method consume_input : unit
method continue_with : (bool -> unit) -> unit
method copy_in_channel : in_channel -> unit
method copy_out : (string -> unit) -> unit
method copy_out_channel : 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 finish : unit
method flush : bool
method get_result : Postgresql.result option
method getline :
?pos:int -> ?len:int -> string -> Postgresql.getline_result
method getline_async :
?pos:int -> ?len:int -> string -> Postgresql.getline_async_result
method host : string
method idle : bool
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 -> string -> 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 next : bool -> unit
method notifies : (string * int) option
method options : string
method pass : string
method port : string
method put_copy_data : ?pos:int -> ?len:int -> string -> bool
method put_copy_end : unit -> bool
method putline : string -> unit
method putnbytes : ?pos:int -> ?len:int -> string -> unit
method request_cancel : unit
method reset : unit
method send :
?noprepare:bool ->
?params:string array -> ?binary_params:bool array -> 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 set_nonblocking : bool -> unit
method set_notice_processor : (string -> unit) -> unit
method socket : int
method status : Postgresql.connection_status
method try_reset : unit
method tty : string
method user : string
end
type read_write = [ `R | `W ]
type read_only = [ `R ]
type rw_async_connection = Pfs_db.read_write Pfs_db.async_connection
type ro_async_connection = Pfs_db.read_only Pfs_db.async_connection
class ['mode] connect : Pfs_db.db_config -> ['mode] async_connection
class async_exec :
'mode Pfs_db.async_connection ->
Unixqueue.event_system ->
?expect:Postgresql.result_status list ->
?params:string array ->
?binary_params:bool array ->
?copy_in_lines:string list ->
?noprepare:bool -> string -> [Postgresql.result] Uq_engines.engine
end