Liking cljdoc? Tell your friends :D

fx.jdbc


as-kebab-mapsclj


as-lower-mapsclj


as-mapsclj


as-modified-mapsclj


as-unqualified-kebab-mapsclj


as-unqualified-lower-mapsclj


as-unqualified-mapsclj


catch-jdbccljmacro

(catch-jdbc body)
(catch-jdbc statement-context body & more-body)

Evaluates body within a try/catch block, converting any thrown Throwable into a typed :jdbc/error failure.

Evaluates `body` within a try/catch block, converting any thrown `Throwable`
into a typed `:jdbc/error` failure.
raw docstring

close-connection>clj

(close-connection> conn)

Creates an effect closing an AutoCloseable connection or statement.

Creates an effect closing an `AutoCloseable` connection or statement.
raw docstring

execute!>clj

(execute!> sql-params)
(execute!> a b)
(execute!> connectable sql-params opts)

Executes a SQL statement returning a vector of row maps or update counts. Supports explicit connectable or context-resolved ::datasource.

Executes a SQL statement returning a vector of row maps or update counts.
Supports explicit connectable or context-resolved `::datasource`.
raw docstring

execute-one!>clj

(execute-one!> sql-params)
(execute-one!> a b)
(execute-one!> connectable sql-params opts)

Executes a SQL statement returning the first row map or nil. Supports explicit connectable or context-resolved ::datasource.

Executes a SQL statement returning the first row map or `nil`.
Supports explicit connectable or context-resolved `::datasource`.
raw docstring

get-connection>clj

(get-connection>)
(get-connection> connectable)
(get-connection> connectable opts)

Creates an effect acquiring a java.sql.Connection from connectable (or ::datasource in context).

Creates an effect acquiring a `java.sql.Connection` from `connectable` (or ::datasource in context).
raw docstring

get-datasource>clj

(get-datasource> db-spec)

Creates an effect yielding a javax.sql.DataSource from a db-spec map or string.

Creates an effect yielding a `javax.sql.DataSource` from a db-spec map or string.
raw docstring

jdbc-errorclj

(jdbc-error e)
(jdbc-error e statement)

Constructs a typed failure with tag :jdbc/error capturing SQLState, error codes, and optional statement context.

Constructs a typed failure with tag `:jdbc/error` capturing SQLState, error codes,
and optional statement context.
raw docstring

missing-connectable-errorclj

(missing-connectable-error)

Constructs a typed failure when no connectable is supplied and ::datasource is absent in context.

Constructs a typed failure when no connectable is supplied and ::datasource is absent in context.
raw docstring

plan!>clj

(plan!> sql-params reduce-fn initial-acc)
(plan!> a b c d)
(plan!> connectable sql-params opts reduce-fn initial-acc)

Executes a streaming lazy reduction over SQL results via next.jdbc/plan. Evaluates (reduce reduce-fn initial-acc (next.jdbc/plan ...)) inside the effect.

Executes a streaming lazy reduction over SQL results via `next.jdbc/plan`.
Evaluates `(reduce reduce-fn initial-acc (next.jdbc/plan ...))` inside the effect.
raw docstring

prepare-statement>clj

(prepare-statement> sql-params)
(prepare-statement> a b)
(prepare-statement> connectable sql-params opts)

Creates an effect preparing a java.sql.PreparedStatement from connectable (or ::datasource in context).

Creates an effect preparing a `java.sql.PreparedStatement` from `connectable` (or ::datasource in context).
raw docstring

with-connection>clj

(with-connection> use-eff-fn)
(with-connection> connectable use-eff-fn)
(with-connection> connectable opts use-eff-fn)

Executes use-eff-fn within a scoped connection, ensuring deterministic close and dynamically binding ::datasource in context.

Executes `use-eff-fn` within a scoped connection, ensuring deterministic close
and dynamically binding ::datasource in context.
raw docstring

with-prepared-statement>clj

(with-prepared-statement> sql-params use-eff-fn)
(with-prepared-statement> a b c)
(with-prepared-statement> connectable sql-params opts use-eff-fn)

Prepares a statement, executes use-eff-fn with the prepared statement, and guarantees closure.

Prepares a statement, executes `use-eff-fn` with the prepared statement, and guarantees closure.
raw docstring

with-transaction>clj

(with-transaction> tx-eff-fn)
(with-transaction> a b)
(with-transaction> connectable opts tx-eff-fn)

Executes tx-eff-fn within a JDBC transaction boundary. Automatically commits on effect success, and rolls back if the inner effect evaluates to an IFailure OR throws an exception. Supports transaction options: :isolation, :read-only, and :rollback-only.

Executes `tx-eff-fn` within a JDBC transaction boundary.
Automatically commits on effect success, and rolls back if the inner effect
evaluates to an `IFailure` OR throws an exception.
Supports transaction options: `:isolation`, `:read-only`, and `:rollback-only`.
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