You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The better-sqlite3 driver should support the enableWal configuration flag, the same way the sqlite3 driver does
The Problem
The current better-sqlite3 driver implementation hardcodes WAL mode for each connection being created. This doesn't make much sense, since the default better-sqlite3 library configuration is not enabling it (even though it recommendeds it).
The Solution
The WAL mode should be set only when enabling WAL in the connection options (similar to the sqlite driver implementation). If not, the DB WAL configuration should be kept (no PRAGMA applied).
Considered Alternatives
When enableWal set to false, set the DB PRAGMA journal_mode to the default Sqlite3 behaviour, which is DELETE, instead.
Relevant Database Driver(s)
DB Type
Relevant
aurora-mysql
no
aurora-postgres
no
better-sqlite3
yes
cockroachdb
no
cordova
no
expo
no
mongodb
no
mysql
no
nativescript
no
oracle
no
postgres
no
react-native
no
sap
no
spanner
no
sqlite
no
sqlite-abstract
no
sqljs
no
sqlserver
no
Are you willing to resolve this issue by submitting a Pull Request?
✖️ Yes, I have the time, and I know how to start.
✅ Yes, I have the time, but I don't know how to start. I would need guidance.
✖️ No, I don’t have the time, but I can support (using donations) development.
✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
The text was updated successfully, but these errors were encountered:
The better-sqlite3 driver should support the enableWal configuration flag, the same way the sqlite3 driver does
The Problem
The current better-sqlite3 driver implementation hardcodes WAL mode for each connection being created. This doesn't make much sense, since the default better-sqlite3 library configuration is not enabling it (even though it recommendeds it).
The Solution
The WAL mode should be set only when enabling WAL in the connection options (similar to the sqlite driver implementation). If not, the DB WAL configuration should be kept (no PRAGMA applied).
Considered Alternatives
When enableWal set to
false
, set the DB PRAGMA journal_mode to the default Sqlite3 behaviour, which is DELETE, instead.Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: