Open kancko opened 2 years ago
This issue can still be reproduced in SQLDelight version 2.0.2.
This issue is more serious than expected. It causes db files to remain locked on Windows OS, preventing them from being renamed or deleted, which means we are unable to replace or reconnect a new database file. Could you please let us know if there are any plans to fix this issue? If needed, I can provide a small reproduction and debugging sample.
It seems to have been fixed here: https://github.com/sqldelight/sqldelight/pull/5205
@hfhbd @AlecKazakova any idea when next version will get released with this fix?
SQLDelight Version
1.5.4
Application Operating System
Android
Describe the Bug
I noticed that the connection does not close when using transactions.
After a little research I found that the implementation of
ConnectionManager
in JdbcDriver is overridden byJdbcSqliteDriverConnectionManager
https://github.com/cashapp/sqldelight/blob/cb699fcc19632a70deeb2930470bcf09db625a42/drivers/sqlite-driver/src/main/kotlin/app/cash/sqldelight/driver/jdbc/sqlite/JdbcSqliteDriver.kt#L58-L70
Thus every time a new transaction is opened by
JdbcSqliteDriver
the connection remains open after its completion. So, in genereal the flow looks like this:Does this mean that the user has to be responsible for closing the connection every time he uses a transaction? What is the point of overriding the functionality of JdbcDriver by JdbcSqliteDriverConnectionManager?