Liking cljdoc? Tell your friends :D

psql.connection

Operational controls exposed by pgjdbc's PGConnection and the JDBC connection: the backend process id, query cancellation, server parameter statuses, the default fetch size, the transaction autosave mode, and a helper to set the per-session statement timeout.

Each function accepts a java.sql.Connection (the value next.jdbc hands you inside with-open/on-connection) and unwraps the pgjdbc PGConnection as needed.

Operational controls exposed by pgjdbc's `PGConnection` and the JDBC
connection: the backend process id, query cancellation, server parameter
statuses, the default fetch size, the transaction autosave mode, and a helper
to set the per-session statement timeout.

Each function accepts a `java.sql.Connection` (the value `next.jdbc` hands you
inside `with-open`/`on-connection`) and unwraps the pgjdbc `PGConnection` as
needed.
raw docstring

autosaveclj

(autosave conn)

Return the transaction autosave mode of CONN as a keyword: :never, :always, or :conservative.

Return the transaction autosave mode of CONN as a keyword:
`:never`, `:always`, or `:conservative`.
sourceraw docstring

backend-pidclj

(backend-pid conn)

Return the server-side backend process id for CONN. Useful for correlating with pg_stat_activity and for out-of-band cancellation.

Return the server-side backend process id for CONN. Useful for correlating
with `pg_stat_activity` and for out-of-band cancellation.
sourceraw docstring

cancel-query!clj

(cancel-query! conn)

Cancel the statement currently executing on CONN, if any. Safe to call from another thread than the one running the query.

Cancel the statement currently executing on CONN, if any. Safe to call from
another thread than the one running the query.
sourceraw docstring

default-fetch-sizeclj

(default-fetch-size conn)

Return the default fetch size applied to statements created from CONN.

Return the default fetch size applied to statements created from CONN.
sourceraw docstring

escape-identifierclj

(escape-identifier conn s)

Quote S as a PostgreSQL identifier using the server's own rules, for safe interpolation of dynamic table/column names.

Quote S as a PostgreSQL identifier using the server's own rules, for safe
interpolation of dynamic table/column names.
sourceraw docstring

parameter-statusclj

(parameter-status conn name)

Return the server's reported value for parameter NAME (for example "server_version" or "TimeZone"), or nil if it is unknown.

Return the server's reported value for parameter NAME (for example
"server_version" or "TimeZone"), or nil if it is unknown.
sourceraw docstring

parameter-statusesclj

(parameter-statuses conn)

Return all server parameter statuses reported for CONN as a Clojure map of string name to string value.

Return all server parameter statuses reported for CONN as a Clojure map of
string name to string value.
sourceraw docstring

set-autosave!clj

(set-autosave! conn mode)

Set the transaction autosave mode of CONN. MODE is :never, :always, or :conservative (pgjdbc places a savepoint before each statement so a failed statement need not poison the whole transaction).

Set the transaction autosave mode of CONN. MODE is `:never`, `:always`, or
`:conservative` (pgjdbc places a savepoint before each statement so a failed
statement need not poison the whole transaction).
sourceraw docstring

set-default-fetch-size!clj

(set-default-fetch-size! conn n)

Set the default fetch size for statements created from CONN. A positive value makes result sets stream in batches instead of materializing fully.

Set the default fetch size for statements created from CONN. A positive value
makes result sets stream in batches instead of materializing fully.
sourceraw docstring

statement-timeout!clj

(statement-timeout! conn ms)

Set statement_timeout for the current session on CONN to MS milliseconds (0 disables it). Later statements that run longer are cancelled by the server.

Set `statement_timeout` for the current session on CONN to MS milliseconds
(0 disables it). Later statements that run longer are cancelled by the server.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close