This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-03
Channels
- # announcements (7)
- # beginners (114)
- # boot (5)
- # calva (25)
- # cider (26)
- # clojure (82)
- # clojure-dev (20)
- # clojure-europe (2)
- # clojure-italy (8)
- # clojure-losangeles (4)
- # clojure-norway (6)
- # clojure-uk (16)
- # clojurescript (21)
- # clojurex (3)
- # core-async (24)
- # cursive (25)
- # datomic (17)
- # emacs (5)
- # events (4)
- # fulcro (9)
- # funcool (1)
- # graalvm (4)
- # hyperfiddle (2)
- # midje (2)
- # mount (2)
- # off-topic (10)
- # pathom (11)
- # pedestal (5)
- # re-frame (36)
- # reagent (15)
- # reitit (3)
- # ring (4)
- # slack-help (2)
- # spacemacs (3)
- # sql (16)
- # tools-deps (5)
wow, thanks!
will try it again, thanks
I think the rollback issue may be caused by HikariCP
it is not rolled back even with exception
are nested transactions noops?
yes! it works if nested transactions removed
another question,
is there a select … for update
helper?
@kirill.salykin Take a look at HoneySQL for helpers for building SQL. Not sure if select-for-update is supported there (but it's easy to extend to support new syntax). next.jdbc
itself is never going to support more SQL than it does today (I nearly didn't add the next.jdbc.sql
namespace at all -- but figured folks using clojure.java.jdbc
would expect those functions).
i just used execute-one
for now
As for nested transactions, JDBC doesn't really support that: transactions are per-connection and you can rollback/commit/savepoint as needed.
I updated the Transactions page to make a lot of that clearer https://github.com/seancorfield/next-jdbc/blob/master/doc/transactions.md
seems like nested transatcion were not rollback’able
clojure.java.jdbc
"allowed" you to nest transactions but it simply ignored nested transactions and everything happened in the top-level transaction.
> seems like nested transatcion were not rollback’able That page explains why (and why you shouldn't do that 🙂 ).
clear, thanks!