Closed jarohen closed 1 year ago
Reusing a connection for a transaction is inherently somewhat dangerous -- because transactions do not nest in JDBC -- so I'm very uncomfortable about an overlaid transaction changing a readonly connection to read/write. I don't think this change is a good idea.
Ok, no worries - thanks for considering it :slightly_smiling_face:
Hey Sean :wave:
This ensures that if the connection has been set to read-only and the user supplies
{:read-only false}
as tx opts, we call(.setReadOnly conn false)
when we open the transaction, and reset it afterwards.I did wonder whether it was intentional not to make a read-only connection read-write - not something I've come across personally but maybe it'd be considered 'safer'?
Cheers,
James