# Index of class methods

B
backend_pid [Postgresql.connection] | `#backend`
binary_tuples [Postgresql.result] | `#binary_tuples`
C
cmd_status [Postgresql.result] | `#cmd_status`
cmd_tuples [Postgresql.result] | `#cmd_tuples`
connect_poll [Postgresql.connection] | After creating a connection with `~startonly:true`, `Postgresql.connection.connect_poll` must be called a number of times before the connection can be used.
consume_input [Postgresql.connection] | `consume_input` consume any available input from backend.
copy_in_channel [Postgresql.connection] | `copy_in_channel ch` sends each line in input channel `ch` to backend server.
copy_out [Postgresql.connection] | `copy_out f` applies `f` to each line returned by backend server.
copy_out_channel [Postgresql.connection] | `copy_out_channel ch` sends each line returned by backend server to output channel `ch`.
D
db [Postgresql.connection] | `#db`
describe_prepared [Postgresql.connection] | `#describe_prepared stm_name` submits a request to obtain information about the specified prepared statement, and waits for completion.
E
empty_result [Postgresql.connection] | `empty_result stat`
endcopy [Postgresql.connection] | `endcopy` synchronizes with the backend.
error [Postgresql.result] | `#error`
error_message [Postgresql.connection] | `#error_message`
escape_bytea [Postgresql.connection] | `escape_bytea ?pos ?len str` escapes binary substring `str` of length `len` starting at position `pos` for use within SQL.
escape_string [Postgresql.connection] | `escape_string ?pos ?len str` escapes ASCII-substring `str` of length `len` starting at position `pos` for use within SQL.
exec [Postgresql.connection] | `exec ?expect ?params ?binary_params query` synchronous execution of query or command `query`.
exec_prepared [Postgresql.connection] | `exec_prepared ?expect ?params ?binary_params stm_name` acts as `#exec`, except executes the prepared query `stm_name`.
F
fformat [Postgresql.result] | `#fformat n`
finish [Postgresql.connection] | `#finish` closes the connection.
flush [Postgresql.connection] | `flush` attempts to flush any data queued to the backend.
fmod [Postgresql.result] | `#fmod n`
fname [Postgresql.result] | `#fname n`
fnumber [Postgresql.result] | `#fnumber field`
fsize [Postgresql.result] | `#fsize n`
ftype [Postgresql.result] | `#ftype n`
ftype_oid [Postgresql.result] | `#ftype n`
G
get_all [Postgresql.result] | `#get_all`
get_all_lst [Postgresql.result] | `#get_all`
get_escaped_value [Postgresql.result] | `#get_escaped_value tuple field`
get_fnames [Postgresql.result] | `#get_fnames`
get_fnames_lst [Postgresql.result] | `#get_fnames_lst`
get_result [Postgresql.connection] | `get_result`
get_tuple [Postgresql.result] | `#get_tuple n`
get_tuple_lst [Postgresql.result] | `#get_tuple_lst n`
getisnull [Postgresql.result] | `#getisnull tuple field` tests for a NULL-value of `field` in `tuple`.
getlength [Postgresql.result] | `#getlength tuple field`
getline [Postgresql.connection] | `getline ?pos ?len buf` reads a newline-terminated line of at most `len` characters into `buf` starting at position `pos`.
getline_async [Postgresql.connection] | `getline_async ?pos ?len buf` reads a newline-terminated line of at most `len` characters into `buf` starting at position `pos` (asynchronously).
getvalue [Postgresql.result] | `#getvalue tuple field`
H
host [Postgresql.connection] | `#host`
I
is_busy [Postgresql.connection] | `is_busy`
is_nonblocking [Postgresql.connection] | `is_nonblocking`
L
lo_close [Postgresql.connection] | `lo_close lo` closes large object `lo`.
lo_creat [Postgresql.connection] | `lo_creat` creates a new large object and returns its oid.
lo_export [Postgresql.connection] | `lo_export oid filename` exports the large object given by `oid` to an operating system file given by `filename`.
lo_import [Postgresql.connection] | `lo_import filename` imports an operating system file given by `filename` as a large object.
lo_open [Postgresql.connection] | `lo_open oid` opens the large object given by `oid` for reading and writing.
lo_read [Postgresql.connection] | `lo_read lo ?pos ?len buf` reads `len` bytes from large object `lo` to buffer `buf` starting at position `pos`.
lo_read_ba [Postgresql.connection] | As `lo_read`, but performs a zero-copy read into the given Bigarray.
lo_seek [Postgresql.connection] | `lo_seek ?pos ?whence lo` seeks read/write position `pos` in large object `lo` relative to the start, current read/write position, or end of the object (`whence` is SEEK_SET, SEEK_CUR, SEEK_END respectively).
lo_tell [Postgresql.connection] | `lo_tell lo`
lo_unlink [Postgresql.connection] | `lo_unlink oid` removes the large object specified by `oid` from the database.
lo_write [Postgresql.connection] | `lo_write ?pos ?len buf lo` writes `len` bytes of buffer `buf` starting at position `pos` to large object `lo`.
lo_write_ba [Postgresql.connection] | As `lo_write`, but performs a zero-copy write from the given Bigarray.
N
nfields [Postgresql.result] | `#nfields`
notifies [Postgresql.connection] | `#notifies`
nparams [Postgresql.result] | `#nparams`
ntuples [Postgresql.result] | `#ntuples`
O
oid_value [Postgresql.result] | `#cmd_tuples`
options [Postgresql.connection] | `#options`
P
paramtype [Postgresql.result] | `#paramtype n`
paramtype_oid [Postgresql.result] | `#paramtype n`
pass [Postgresql.connection] | `#pass`
port [Postgresql.connection] | `#port`
prepare [Postgresql.connection] | `prepare stm_name query` creates a prepared query named `stm_name` which will execute the query or command `query` when passed to `#exec_prepared`.
putline [Postgresql.connection] | `putline str` sends `str` to backend server.
putnbytes [Postgresql.connection] | `putnbytes ?pos ?len buf` sends the substring of `buf` of length `len` starting at `pos` to backend server (use this method for binary data).
R
request_cancel [Postgresql.connection] | `request_cancel` requests that PostgreSQL abandon processing of the current command.
reset [Postgresql.connection] | `#reset` resets the connection.
reset_poll [Postgresql.connection] | Used analogously to `Postgresql.connection.connect_poll` after calling `Postgresql.connection.reset_start`.
reset_start [Postgresql.connection] | An asynchronous variant of `Postgresql.connection.reset`.
S
send_describe_portal [Postgresql.connection] | `#send_describe_portal portal_name` sends a request for a description of the named portal.
send_describe_prepared [Postgresql.connection] | `#send_describe_prepared stm_name` sends a request for a description of a prepared query without waiting for the result.
send_prepare [Postgresql.connection] | `#send_prepare stm_name query` sends a query preparation without waiting for the result.
send_query [Postgresql.connection] | `send_query ?params ?binary_params query` asynchronous execution of query or command `query`.
send_query_prepared [Postgresql.connection] | `#send_query_prepared ?params ?binary_params stm_name` is an asynchronous version of `query_prepared`.
server_version [Postgresql.connection] |
set_nonblocking [Postgresql.connection] | `set_nonblocking b` sets state of the connection to nonblocking if `b` is true and to blocking otherwise.
set_notice_processor [Postgresql.connection] | `#set_notice_processor` controls reporting of notice and warning messages generated by a connection.
set_single_row_mode [Postgresql.connection] | `#set_single_row_mode` called right after `Postgresql.connection.send_query` or a sibling function causes the returned rows to be split into individual results.
socket [Postgresql.connection] | `socket` obtains the file descriptor for the backend connection socket as an integer.
status [Postgresql.result] | `#status`
status [Postgresql.connection] | `#status`
T
try_reset [Postgresql.connection] | `#try_reset` tries to reset the connection if it is bad.
tty [Postgresql.connection] | `#tty`
U
user [Postgresql.connection] | `#user`