Liking cljdoc? Tell your friends :D

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

boxclj

(box obj)
(box p1 p2)
(box x1 y1 x2 y2)

Create a PGbox object.

Create a PGbox object.
sourceraw docstring

circleclj

(circle obj)
(circle center-point r)
(circle x y r)

Create a PGcircle object.

Create a PGcircle object.
sourceraw docstring

close!clj

(close! {:keys [datasource]})

Close db-spec if possible. Return true if the datasource can close and is closed.

Close db-spec if possible. Return true if the datasource can close and is closed.
sourceraw docstring

default-specclj

(default-spec)

Set defaults like the psql command line tool. Use the username for the user and dbname. Do not set a host.

Set defaults like the psql command line tool.
Use the username for the user and dbname. Do not set a host.
sourceraw docstring

env-specclj

(env-spec {:keys [PGDATABASE PGHOST PGPORT PGUSER PGTARGETSESSIONATTRS]
           :as env})

Get a db spec from libpq PG* environment variables. Use pgjdbc property names where needed. PGHOSTADDR, PGCLIENTENCODING, PGREQUIREPEER, PGSSLCRL/SNI/min-max-proto, and the Unix-socket default host are unsupported.

Get a db spec from libpq PG* environment variables. Use pgjdbc property names where needed.
PGHOSTADDR, PGCLIENTENCODING, PGREQUIREPEER, PGSSLCRL/SNI/min-max-proto, and the Unix-socket default host are unsupported.
sourceraw docstring

getenv->mapclj

(getenv->map)
(getenv->map env)

Keywordize an environment-style map. With no argument, read (System/getenv). Accept any map-like input. Callers can pass a plain map in tests.

Keywordize an environment-style map. With no argument, read (System/getenv).
Accept any map-like input. Callers can pass a plain map in tests.
sourceraw docstring

intervalclj

(interval &
          {:keys [years months days hours minutes seconds]
           :or {years 0 months 0 days 0 hours 0 minutes 0 seconds 0.0}})

Create a PGinterval. Example: (pg/interval :hours 2)

Create a PGinterval. Example: (pg/interval :hours 2)
sourceraw docstring

jsonpathclj

(jsonpath s)

Create a PostgreSQL jsonpath value.

Create a PostgreSQL `jsonpath` value.
sourceraw docstring

lineclj

(line obj)
(line p1 p2)
(line x1 y1 x2 y2)

Create a PGline object.

Create a PGline object.
sourceraw docstring

lsegclj

(lseg obj)
(lseg p1 p2)
(lseg x1 y1 x2 y2)

Create a PGlseg object.

Create a PGlseg object.
sourceraw docstring

macaddrclj

(macaddr s)

Create a PostgreSQL macaddr (6-byte MAC address) value.

Create a PostgreSQL `macaddr` (6-byte MAC address) value.
sourceraw docstring

macaddr8clj

(macaddr8 s)

Create a PostgreSQL macaddr8 (8-byte EUI-64 MAC address) value.

Create a PostgreSQL `macaddr8` (8-byte EUI-64 MAC address) value.
sourceraw docstring

moneyclj

(money amount)

Create a PGmoney object.

Create a PGmoney object.
sourceraw docstring

objectclj

(object type value)

Create a custom PGobject. Example: (pg/object "json" "{}")

Create a custom PGobject. Example: (pg/object "json" "{}")
sourceraw docstring

pathclj

(path obj)
(path points open?)

Create a PGpath object.

Create a PGpath object.
sourceraw docstring

pg-lsnclj

(pg-lsn s)

Create a PostgreSQL pg_lsn (log sequence number) value.

Create a PostgreSQL `pg_lsn` (log sequence number) value.
sourceraw docstring

pointclj

(point obj)
(point x y)

Create a PGpoint object.

Create a PGpoint object.
sourceraw docstring

polygonclj

(polygon points-or-str)

Create a PGpolygon object.

Create a PGpolygon object.
sourceraw docstring

poolclj

(pool & rest)
source

specclj

(spec & {:keys [password service env] :as opts})

Create a PostgreSQL database spec with libpq-style layers. Explicit options override a :service/PGSERVICE definition. The service definition overrides ordinary PG* environment values. Environment values override built-in defaults. Accept overrides: (spec :dbname ... :host ... :port ... :user ... :password ...)

Password precedence uses the same layers, then uses ~/.pgpass. Pass :env with a plain environment map for repeatable tests.

Create a PostgreSQL database spec with libpq-style layers. Explicit options override a :service/PGSERVICE definition.
The service definition overrides ordinary PG* environment values. Environment values override built-in defaults. Accept overrides:
(spec :dbname ... :host ... :port ... :user ... :password ...)

Password precedence uses the same layers, then uses ~/.pgpass.
Pass :env with a plain environment map for repeatable tests.
sourceraw docstring

tablesclj

(tables db)

Return the set of table names (as keywords) visible in the database DB.

Return the set of table names (as keywords) visible in the database DB.
sourceraw docstring

tsqueryclj

(tsquery s)

Create a PostgreSQL tsquery (full-text query) value.

Create a PostgreSQL `tsquery` (full-text query) value.
sourceraw docstring

tsvectorclj

(tsvector s)

Create a PostgreSQL tsvector (full-text document) value.

Create a PostgreSQL `tsvector` (full-text document) value.
sourceraw docstring

xmlclj

(xml s)

Create a PostgreSQL XML object.

Create a PostgreSQL XML object.
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