Immediately
As a follow-up to the excellent Optimizing SQLite for servers article, this release has a more impactful change in that it opens non-readonly transactions in the IMMEDIATE
mode.
The problem w/ DEFERRED
transactions is that they don't honour the busy handler, i.e. will fail w/ SQLITE_BUSY
immediately on upgrades.
As a result, it is more important to explicitly use readTransaction { tx in }
when only doing reads. Previously w/ DEFERRED
, one could still use transaction
w/ read-only behaviour.
The old mode can still be used by specifying the mode manually, e.g. transaction(mode: .deferrred) { tx in ... }
.