Liking cljdoc? Tell your friends :D

psql.core

Allow using PostgreSQL from Clojure as effortlessly as possible by reading connection parameter defaults from PostgreSQL environment variables PGDATABASE, PGHOST, PGPORT, PGUSER and by reading password from ~/.pgpass if available.

Allow using PostgreSQL from Clojure as effortlessly as possible by reading connection parameter defaults from
PostgreSQL environment variables PGDATABASE, PGHOST, PGPORT, PGUSER and by reading password from ~/.pgpass if 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 was closeable and closed.

Close db-spec if possible. Return true if the datasource was closeable and closed.
sourceraw docstring

default-specclj

(default-spec)

Reasonable defaults as with the psql command line tool. Use username for user and db. Don't use host.

Reasonable defaults as with the psql command line tool.
Use username for user and db. Don't use host.
sourceraw docstring

env-specclj

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

Get a db spec from libpq PG* environment variables, translated to 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, translated to 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, reads (System/getenv). Accepts any map-like input so callers can pass a plain map in tests.

Keywordize an environment-style map. With no argument, reads (System/getenv).
Accepts any map-like input so 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. (pg/interval :hours 2)

Create a PGinterval. (pg/interval :hours 2)
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

moneyclj

(money amount)

Create PGmoney object

Create PGmoney object
sourceraw docstring

objectclj

(object type value)

Make a custom PGobject, e.g. (pg/object "json" "{}")

Make a custom PGobject, e.g. (pg/object "json" "{}")
sourceraw docstring

pathclj

(path obj)
(path points open?)

Create a PGpath object

Create a PGpath object
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 layering: explicit options override a :service/PGSERVICE definition, which overrides ordinary PG* environment values, which override built-in defaults. Accepts overrides: (spec :dbname ... :host ... :port ... :user ... :password ...)

Password precedence follows the same layers, then falls back to ~/.pgpass. Pass :env with a plain environment map for deterministic use in tests.

Create a PostgreSQL database spec with libpq-style layering: explicit
options override a :service/PGSERVICE definition, which overrides ordinary
PG* environment values, which override built-in defaults. Accepts overrides:
(spec :dbname ... :host ... :port ... :user ... :password ...)

Password precedence follows the same layers, then falls back to ~/.pgpass.
Pass :env with a plain environment map for deterministic use in 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

xmlclj

(xml s)

Make PostgreSQL XML object

Make 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