(auto-commit? db)
Returns true if the current database connection is in auto commit mode, otherwise false.
Returns true if the current database connection is in auto commit mode, otherwise false.
(commit! db)
Commit the current database connection.
Commit the current database connection.
(connect db & [opts])
Connect to db
using opts
.
Connect to `db` using `opts`.
(-connect driver db opts)
(-connection driver db)
(-disconnect driver db)
(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.
(-execute-all driver db sql opts)
(-execute-one driver db sql opts)
(load-drivers)
Load the driver namespaces.
Load the driver namespaces.
(prepare db sql & [opts])
Return a prepared statement for sql
.
Return a prepared statement for `sql`.
(row-count result)
Normalize into a record, with the count of affected rows.
Normalize into a record, with the count of affected rows.
(savepoint? x)
Return true if x
is a java.sql.Savepoint, otherwise false.
Return true if `x` is a java.sql.Savepoint, otherwise false.
(set-savepoint! db & [name])
Set a savepoint on the current connection.
Set a savepoint on the current connection.
(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.
(transact db f & [opts])
Run f
within a database transaction on db
.
Run `f` within a database transaction on `db`.
(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-rollback [db-sym db] & body)
Start a transaction, evaluate body
and rollback.
Start a transaction, evaluate `body` and rollback.
(with-savepoint [db-sym db opts] & body)
Start a transaction, evaluate body
and rollback.
Start a transaction, evaluate `body` and rollback.
(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