fix #245
This commit is contained in:
parent
890ff9de7b
commit
8f372917a4
2 changed files with 9 additions and 1 deletions
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
Only accretive/fixative changes will be made from now on.
|
||||
|
||||
* 1.3.next in progress
|
||||
* Address [#245](https://github.com/seancorfield/next-jdbc/issues/245) by not `locking` the `Connection` when `*nested-tx*` is bound to `:ignore` -- improving `clojure.java.jdbc` compatibility.
|
||||
|
||||
* 1.3.862 -- 2023-03-13
|
||||
* Fix [#243](https://github.com/seancorfield/next-jdbc/issues/243) by ensuring URI properties become keywords.
|
||||
* Fix [#242](https://github.com/seancorfield/next-jdbc/issues/242) by making the logging wrapper aware of the default options wrapper.
|
||||
|
|
|
|||
|
|
@ -115,7 +115,12 @@
|
|||
(extend-protocol p/Transactable
|
||||
java.sql.Connection
|
||||
(-transact [this body-fn opts]
|
||||
(cond (or (not *active-tx*) (= :allow *nested-tx*))
|
||||
(cond
|
||||
(and (not *active-tx*) (= :ignore *nested-tx*))
|
||||
;; #245 do not lock when in c.j.j compatibility mode:
|
||||
(binding [*active-tx* true]
|
||||
(transact* this body-fn opts))
|
||||
(or (not *active-tx*) (= :allow *nested-tx*))
|
||||
(locking this
|
||||
(binding [*active-tx* true]
|
||||
(transact* this body-fn opts)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue