(begin db & [opts])
Begin a new db
transaction.
Begin a new `db` transaction.
(commit db & [opts])
Commit the current db
transaction.
Commit the current `db` transaction.
(connect db & [opts])
Connect to db
using opts
.
Connect to `db` using `opts`.
(connected? db)
Returns true if db
is connected, otherwise false.
Returns true if `db` is connected, otherwise false.
(connection db)
Return the current connection to db
.
Return the current connection to `db`.
(execute stmt & [opts])
Execute stmt
against a database.
Execute `stmt` against a database.
(execute-sql-query db sql & [opts])
Execute a SQL query.
Execute a SQL query.
(execute-sql-statement db sql & [opts])
Execute a SQL statement.
Execute a SQL statement.
(-connect driver db opts)
(-connection driver db)
(-disconnect driver db)
(-begin driver db opts)
(-commit driver db opts)
(-rollback driver db opts)
(load-drivers)
Load the driver namespaces.
Load the driver namespaces.
(prepare-statement db sql & [opts])
Return a prepared statement for sql
.
Return a prepared statement for `sql`.
(rollback db & [opts])
Rollback the current db
transaction.
Rollback the current `db` transaction.
(row-count result)
Normalize into a record, with the count of affected rows.
Normalize into a record, with the count of affected rows.
(sql-str stmt)
Prepare stmt
using the database and return the raw SQL as a string.
Prepare `stmt` using the database and return the raw SQL as a string.
(with-connection [db-sym db & [opts]] & body)
Open a database connection, bind the connected db
to db-sym
,
evaluate body
and close the connection again.
Open a database connection, bind the connected `db` to `db-sym`, evaluate `body` and close the connection again.
(with-connection* db f & [opts])
Open a database connection, call f
with the connected db
as
argument and close the connection again.
Open a database connection, call `f` with the connected `db` as argument and close the connection again.
(with-transaction [db-sym db & [opts]] & body)
Start a new db
transaction, bind db
to db-sym
and evaluate
body
within the transaction.
Start a new `db` transaction, bind `db` to `db-sym` and evaluate `body` within the transaction.
(with-transaction* db f & [opts])
Start a new db
transaction call f
with db
as argument and
commit the transaction. If f
throws any exception the transaction
gets rolled back.
Start a new `db` transaction call `f` with `db` as argument and commit the transaction. If `f` throws any exception the transaction gets rolled back.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close