Liking cljdoc? Tell your friends :D

psql.notify

PostgreSQL LISTEN/NOTIFY helpers that use pgjdbc.

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

PostgreSQL LISTEN/NOTIFY helpers that use pgjdbc.

Use a dedicated open connection for listening. pgjdbc surfaces notifications
only when a query is sent or get-notifications is called. A blocking poll
prevents other statements from using the 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 can block all other statements on this connection. Use a dedicated connection. A zero timeout does 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 can block all other statements on this connection. Use a
dedicated connection. A zero timeout does a non-blocking poll.
sourceraw docstring

listen!clj

(listen! conn channel)

LISTEN on a channel with a dedicated open connection.

The caller owns the connection lifecycle.

LISTEN on a channel with 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 a payload on a channel with an open connection.

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

Send a payload on a channel with 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 a channel on an open connection.

The caller owns the connection lifecycle.

UNLISTEN from a 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