Fork me on GitHub
#sql
<
2019-07-03
>
kirill.salykin08:07:02

will try it again, thanks

kirill.salykin13:07:52

I think the rollback issue may be caused by HikariCP

kirill.salykin13:07:54

it is not rolled back even with exception

kirill.salykin13:07:04

are nested transactions noops?

kirill.salykin13:07:35

yes! it works if nested transactions removed

kirill.salykin13:07:44

another question, is there a select … for update helper?

kirill.salykin14:07:04

Just want to say one more time huge thank you for your work on jdbc.next

👍 8
seancorfield14:07:27

@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).

kirill.salykin14:07:50

i just used execute-one for now

seancorfield14:07:23

As for nested transactions, JDBC doesn't really support that: transactions are per-connection and you can rollback/commit/savepoint as needed.

seancorfield14:07:00

I updated the Transactions page to make a lot of that clearer https://github.com/seancorfield/next-jdbc/blob/master/doc/transactions.md

kirill.salykin14:07:10

seems like nested transatcion were not rollback’able

seancorfield14:07:33

clojure.java.jdbc "allowed" you to nest transactions but it simply ignored nested transactions and everything happened in the top-level transaction.

seancorfield14:07:06

> seems like nested transatcion were not rollback’able That page explains why (and why you shouldn't do that 🙂 ).