next.jdbc.transaction

(source)
Implementation of SQL transaction logic. In general, you cannot nest transactions. `clojure.java.jdbc` would ignore any attempt to create a nested transaction, even tho' some databases do support it. `next.jdbc` allows you to call `with-transaction` even while you are inside an active transaction, but the behavior may vary across databases and the commit or rollback boundaries may not be what you expect. In order to avoid two transactions constructed on the same connection from interfering with each other, `next.jdbc` locks on the `Connection` object (this prevents concurrent transactions on separate threads from interfering but will cause deadlock on a single thread -- so beware). Consequently, this namespace exposes a dynamic variable, `*nested-tx*`, which can be used to vary the behavior when an attempt is made to start a transaction when you are already inside a transaction.
Public Variable Short Description
*nested-tx* (clj) Controls the behavior when a nested transaction is attempted.