Liking cljdoc? Tell your friends :D

psql.notify

PostgreSQL LISTEN/NOTIFY helpers backed directly by pgjdbc.

Use a dedicated open connection for listening. pgjdbc surfaces notifications only when a query is issued or get-notifications is called. A blocking poll prevents other statements from using that connection until the poll returns.

PostgreSQL LISTEN/NOTIFY helpers backed directly by pgjdbc.

Use a dedicated open connection for listening. pgjdbc surfaces notifications
only when a query is issued or get-notifications is called. A blocking poll
prevents other statements from using that connection until the poll returns.
raw docstring

get-notificationsclj

(get-notifications conn)
(get-notifications conn timeout-millis)

Poll an open PostgreSQL connection for notifications.

Returns a vector of {:name :parameter :pid} maps, or an empty vector. A positive timeout may block all other statements on this connection, so use a dedicated connection. A zero timeout performs a non-blocking poll.

Poll an open PostgreSQL connection for notifications.

Returns a vector of {:name :parameter :pid} maps, or an empty vector. A
positive timeout may block all other statements on this connection, so use a
dedicated connection. A zero timeout performs a non-blocking poll.
sourceraw docstring

listen!clj

(listen! conn channel)

LISTEN on channel using a dedicated open connection.

The caller owns the connection lifecycle.

LISTEN on channel using a dedicated open connection.

The caller owns the connection lifecycle.
sourceraw docstring

notification->mapclj

(notification->map notification)

Convert a pgjdbc notification to a Clojure map.

Convert a pgjdbc notification to a Clojure map.
sourceraw docstring

notify!clj

(notify! conn channel payload)

Send payload on channel using an open connection.

The channel is validated as an identifier and the payload is escaped by pgjdbc. Payloads are never logged.

Send payload on channel using an open connection.

The channel is validated as an identifier and the payload is escaped by
pgjdbc. Payloads are never logged.
sourceraw docstring

quote-channelclj

(quote-channel channel)

Validate and quote a channel name as a PostgreSQL identifier.

Channel names are restricted to portable ASCII identifier characters to make SQL interpolation secure by default.

Validate and quote a channel name as a PostgreSQL identifier.

Channel names are restricted to portable ASCII identifier characters to make
SQL interpolation secure by default.
sourceraw docstring

unlisten!clj

(unlisten! conn channel)

UNLISTEN from channel on an open connection.

The caller owns the connection lifecycle.

UNLISTEN from channel on an open connection.

The caller owns the connection lifecycle.
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