SQLDelight/Postgresql: is there any way to set the...
# squarelibraries
t
SQLDelight/Postgresql: is there any way to set the transaction isolation level for a transaction?
g
😞 Sadly, unless someone else knows, the Transacter in JDBCDriver api doesn’t yet support setting the isolation level The only escape hatch is to use
driver.execute
in a transaction block such as:
Copy code
example.myQueries.transaction {
   driver.execute(null, "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE", 0)
   example.myQueries.update(123, "mychange")
}
t
Thank you that is actually pretty helpful. This way I could write extensions functions for each isolation level.
However I feel like this is something that should be supported by sqldelight.