Liking cljdoc? Tell your friends :D

co.gaiwan.oak.lib.db

Convenience functions for next.jdbc/honeysql

Default to returning kebab-cased qualified maps.

Convenience functions for next.jdbc/honeysql

Default to returning kebab-cased qualified maps.
raw docstring

execute!clj

(execute! ds qry)

execute-honey!clj

(execute-honey! ds qry)

insert!clj

(insert! ds table key-map)

munge-responseclj

(munge-response o)

table-colsclj

(table-cols conn table-name)

table-namesclj

(table-names conn)

update!clj

(update! ds {:keys [update set where]})

Perform a UPDATE query, sets updated_at

Perform a UPDATE query, sets `updated_at`
raw docstring

with-transactioncljmacro

(with-transaction [sym transactable opts] & body)

Given a transactable object, gets a connection and binds it to sym, then executes the body in that context, committing any changes if the body completes successfully, otherwise rolling back any changes made.

Like with-open, if with-transaction creates a new Connection object, it will automatically close it for you.

If you are working with default options via with-options, you might want to use with-transaction+options instead.

The options map supports:

  • :isolation -- :none, :read-committed, :read-uncommitted, :repeatable-read, :serializable,
  • :read-only -- true / false (true will make the Connection readonly),
  • :rollback-only -- true / false (true will make the transaction rollback, even if it would otherwise succeed).
Given a transactable object, gets a connection and binds it to `sym`,
then executes the `body` in that context, committing any changes if the body
completes successfully, otherwise rolling back any changes made.

Like `with-open`, if `with-transaction` creates a new `Connection` object,
it will automatically close it for you.

If you are working with default options via `with-options`, you might want
to use `with-transaction+options` instead.

The options map supports:
* `:isolation` -- `:none`, `:read-committed`, `:read-uncommitted`,
    `:repeatable-read`, `:serializable`,
* `:read-only` -- `true` / `false` (`true` will make the `Connection` readonly),
* `:rollback-only` -- `true` / `false` (`true` will make the transaction
    rollback, even if it would otherwise succeed).
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