Closed bo-chen closed 9 years ago
Repro:
(car/wcar {:pool {} :spec {:db 0}} (car/set "thisdb" 0)) (car/wcar {:pool {} :spec {:conn-setup-fn (fn [_] (car/select "1"))}} (car/set "thisdb" 1)) (car/wcar {:pool {} :spec {:db 1}} (car/get "thisdb")) ; => expected 1, but returns 0
Cause: connections.clj line 70: (when (and db (not (zero? db)) db)) The parens nesting is off so this always returns nil.
(when (and db (not (zero? db)) db))
Hi Bo, thanks a lot for the catch - fixed on the dev branch and SNAPSHOT. Cheers! :-)
Repro:
Cause: connections.clj line 70:
(when (and db (not (zero? db)) db))
The parens nesting is off so this always returns nil.