Support WAL mode under exclusive locking
According to the docs since v3.7.4 WAL mode is supported without support for memory-mapping by setting a pragma that makes sqlite always ask for exclusive locking of the file.
It may be worth updating the readme to mention this detail.
Though it's not entirely clear if this is a meaningful distinction, like if only one process at any given time can read from the database maybe WAL mode isn't that useful to begin with 🤔
This won’t help with performance, but would mean we can open wal mode sqlite files without error so I think enabling this by default would be useful!
Apparently one can't just open a database and set the magic pragmas to get WAL mode to work, the docs say:
If EXCLUSIVE locking mode is set prior to the first WAL-mode database access
I'm assuming that means the pragma has to be set prior to actually opening the database.
But that's actually impossible in the current version of deno-sqlite, I'm guessing there should be like an "init" option when creating a DB instance that automatically executes the init string before actually opening a database, or something like that 🤔 Could it be added? It'd be pretty cool if WAL databases were usable.