scalikejdbc-async
scalikejdbc-async copied to clipboard
Support for setting isolation level for DB/DBConnection
Would it be interesting to implement a special pass-through parameter to set an isolation level for a transaction? Right now, it's possible to set an isolation level in scalikejdbc, but scalikejdbc-async misses this feature.
I haven't given much thought about the impact of this in an async setting, so please tell me if there are any unforeseen issues with such an addition.
Background details
- Implementation in scalikejdbc
- https://github.com/scalikejdbc/scalikejdbc/issues/442
- Background info for databases
- https://mariadb.com/kb/en/mariadb-transactions-and-isolation-levels-for-sql-server-users/
- https://www.postgresql.org/docs/current/transaction-iso.html
Hello, I think the feasibility to add the feature relies on the underlying library's support - https://github.com/jasync-sql/jasync-sql
I haven't checked yet but if the library provides a unified way to set an isolation level (probably no?), it should be relatively easy. If not, I think handling the differences among RDBMSs in this library is not a great idea.
I already looked a bit into that a bit and right now, it looks like jasync-sql has nothing for it. It does pass the parameter on, but in no way does it facilitate anything:
You think it would be better to ask jasync-sql for support, and then come back here when they have something for it?
Yeah, once they support it, I'm happy to add the feature to this library.