This PR adds two new settings when attaching SQLite databases - busy_timeout and journal_mode.
busy_timeout specifies a busy timeout in milliseconds, see here. This refers to the amount of time the process will wait if there is another process operating on the SQLite file. The default is now set to 5 seconds (i.e. BUSY_TIMEOUT = 5000), which is the same default used by rusqlite.
journal_mode specifies a journaling mode, e.g. journal_mode can be WAL. See here for more info.
Usage:
ATTACH 'file.db' AS f (TYPE SQLITE, BUSY_TIMEOUT 0);
ATTACH 'file.db' AS f (TYPE SQLITE, JOURNAL_MODE 'WAL');
This fixes the linked issue by specifying a busy time-out by default which prevents database is locked errors from appearing until after the timeout has passed. To restore previous behavior where the system would immediately return database is locked a busy_timeout of 0 can be specified.
Fixes #82
This PR adds two new settings when attaching SQLite databases -
busy_timeout
andjournal_mode
.busy_timeout
specifies a busy timeout in milliseconds, see here. This refers to the amount of time the process will wait if there is another process operating on the SQLite file. The default is now set to 5 seconds (i.e.BUSY_TIMEOUT = 5000
), which is the same default used by rusqlite.journal_mode
specifies a journaling mode, e.g.journal_mode
can beWAL
. See here for more info.Usage:
This fixes the linked issue by specifying a busy time-out by default which prevents
database is locked
errors from appearing until after the timeout has passed. To restore previous behavior where the system would immediately returndatabase is locked
abusy_timeout
of 0 can be specified.