Liking cljdoc? Tell your friends :D

psql.catalog

Schema and catalog introspection over JDBC DatabaseMetaData, returning normalized Clojure data. Each function takes a db spec or datasource (anything next.jdbc/get-connection accepts) and, optionally, a table name.

Table and schema names are accepted as strings or keywords. Results use keyword names so they compose with the rest of psql-clj.

Schema and catalog introspection over JDBC `DatabaseMetaData`, returning
normalized Clojure data. Each function takes a db spec or datasource (anything
`next.jdbc/get-connection` accepts) and, optionally, a table name.

Table and schema names are accepted as strings or keywords. Results use
keyword names so they compose with the rest of psql-clj.
raw docstring

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

psql.copy

PostgreSQL COPY helpers that use pgjdbc's CopyManager.

COPY runs on a java.sql.Connection. The caller owns the connection and must keep it open for the COPY operation.

PostgreSQL COPY helpers that use pgjdbc's CopyManager.

COPY runs on a java.sql.Connection. The caller owns the connection and must keep it open for the COPY operation.
raw docstring

psql.core

Use PostgreSQL from Clojure with connection parameter defaults from PGDATABASE, PGHOST, PGPORT, and PGUSER. Read the password from ~/.pgpass when it is available.

Use PostgreSQL from Clojure with connection parameter defaults from PGDATABASE, PGHOST, PGPORT, and PGUSER.
Read the password from ~/.pgpass when it is available.
raw docstring

psql.largeobject

PostgreSQL large-object (lo) helpers over pgjdbc's LargeObjectManager.

Large objects are stored in pg_largeobject and addressed by an OID. Every operation must run inside a transaction (set autocommit off, e.g. with next.jdbc/with-transaction); pgjdbc raises otherwise. Each function accepts the java.sql.Connection for manager operations, or an open LargeObject for read/write/seek. The caller owns the connection and transaction lifecycle.

PostgreSQL large-object (`lo`) helpers over pgjdbc's `LargeObjectManager`.

Large objects are stored in `pg_largeobject` and addressed by an OID. Every
operation must run inside a transaction (set autocommit off, e.g. with
`next.jdbc/with-transaction`); pgjdbc raises otherwise. Each function accepts
the `java.sql.Connection` for manager operations, or an open `LargeObject` for
read/write/seek. The caller owns the connection and transaction lifecycle.
raw docstring

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

psql.pgpass

Match ~/.pgpass passwords to db specs.

Match ~/.pgpass passwords to db specs.
raw docstring

psql.pool

Hikari connection pool.

Hikari connection pool.
raw docstring

psql.replication

PostgreSQL streaming replication over pgjdbc: log sequence numbers (LSNs), replication-slot management, and logical decoding streams.

A replication connection is a special connection opened with the replication property set; replication-spec adds the required properties to a db spec. The server must run with wal_level = logical (and enough max_wal_senders / max_replication_slots) for logical replication.

PostgreSQL streaming replication over pgjdbc: log sequence numbers (LSNs),
replication-slot management, and logical decoding streams.

A replication connection is a special connection opened with the `replication`
property set; `replication-spec` adds the required properties to a db spec.
The server must run with `wal_level = logical` (and enough `max_wal_senders` /
`max_replication_slots`) for logical replication.
raw docstring

psql.service

Resolve pgjdbc service definitions to psql-clj database specs.

Resolve pgjdbc service definitions to psql-clj database specs.
raw docstring

psql.types

Extend next.jdbc's SettableParameter and ReadableColumn protocols so that PGobject (json/jsonb/enum), SQL arrays, and inet values move between Clojure data and PostgreSQL without manual wrapping.

The map->parameter / vec->parameter / num->parameter multimethods are the extension point: companion artifacts, such as psql-clj-gis, add methods for their SQL types without this namespace depending on them.

Extend next.jdbc's SettableParameter and ReadableColumn protocols so that
PGobject (json/jsonb/enum), SQL arrays, and inet values move between Clojure
data and PostgreSQL without manual wrapping.

The map->parameter / vec->parameter / num->parameter multimethods are the
extension point: companion artifacts, such as psql-clj-gis, add methods for
their SQL types without this namespace depending on them.
raw 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