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


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 ::connection / ::datasource.

Executes a SQL statement returning a vector of row maps or update counts.
Supports explicit connectable or context-resolved `::connection` / `::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 ::connection / ::datasource.

Executes a SQL statement returning the first row map or `nil`.
Supports explicit connectable or context-resolved `::connection` / `::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 ::connection / ::datasource in context).

Creates an effect acquiring a `java.sql.Connection` from `connectable` (or ::connection / ::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-failureclj

(jdbc-failure e)
(jdbc-failure 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-failureclj

(missing-connectable-failure)

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. Supports explicit connectable or context-resolved ::connection / ::datasource.

Executes a streaming lazy reduction over SQL results via `next.jdbc/plan`.
Evaluates `(reduce reduce-fn initial-acc (next.jdbc/plan ...))` inside the effect.
Supports explicit connectable or context-resolved `::connection` / `::datasource`.
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 ::connection / ::datasource in context).

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

provide-connection>clj

(provide-connection> conn)
(provide-connection> a b)

Executes eff within a dynamic context where ::connection is bound to conn. Supports point-free pipeline threading and standalone wrapping: (-> (sql/query!> ["SELECT * FROM users"]) (fx-jdbc/provide-connection> conn)) (fx-jdbc/provide-connection> conn eff)

Executes `eff` within a dynamic context where `::connection` is bound to `conn`.
Supports point-free pipeline threading and standalone wrapping:
  (-> (sql/query!> ["SELECT * FROM users"])
      (fx-jdbc/provide-connection> conn))
  (fx-jdbc/provide-connection> conn eff)
raw docstring

provide-datasource>clj

(provide-datasource> ds)
(provide-datasource> a b)

Executes eff within a dynamic context where ::datasource is bound to ds. Supports point-free pipeline threading and standalone wrapping: (-> (sql/query!> ["SELECT * FROM users"]) (fx-jdbc/provide-datasource> ds)) (fx-jdbc/provide-datasource> ds eff)

Executes `eff` within a dynamic context where `::datasource` is bound to `ds`.
Supports point-free pipeline threading and standalone wrapping:
  (-> (sql/query!> ["SELECT * FROM users"])
      (fx-jdbc/provide-datasource> ds))
  (fx-jdbc/provide-datasource> ds eff)
raw docstring

provide-transaction>clj

(provide-transaction> tx)
(provide-transaction> a b)

Executes eff within a dynamic context where ::transaction is bound to tx. Supports point-free pipeline threading and standalone wrapping: (-> (sql/insert!> :users {:name "Alice"}) (fx-jdbc/provide-transaction> tx)) (fx-jdbc/provide-transaction> tx eff)

Executes `eff` within a dynamic context where `::transaction` is bound to `tx`.
Supports point-free pipeline threading and standalone wrapping:
  (-> (sql/insert!> :users {:name "Alice"})
      (fx-jdbc/provide-transaction> tx))
  (fx-jdbc/provide-transaction> tx eff)
raw docstring

with-connection>clj

(with-connection> eff)
(with-connection> a b)
(with-connection> connectable opts eff)

Executes eff within a scoped connection, ensuring deterministic close and dynamically binding ::datasource and ::connection in context. Resolves connectable from explicit connectable, upstream value, or context.

Executes `eff` within a scoped connection, ensuring deterministic close
and dynamically binding `::datasource` and `::connection` in context.
Resolves connectable from explicit `connectable`, upstream value, or 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)
(with-transaction> a b)
(with-transaction> connectable opts tx-eff)

Executes tx-eff within a JDBC transaction boundary as a higher-order effect. 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. Connectable can be passed explicitly or resolved implicitly from context.

Executes `tx-eff` within a JDBC transaction boundary as a higher-order effect.
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`.
Connectable can be passed explicitly or resolved implicitly from context.
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