4 ms·
> This breaks one important invariant: unless the user clicks "Save", the original file must not be modified in any way. SQLite's default rollback journaling m
by teraflop 6y ago
> This breaks one important invariant: unless the user clicks "Save", the original file must not be modified in any way.
SQLite's default rollback journaling mode doesn't satisfy this property, but WAL mode does: updates will be first written to the WAL file, and automatically copied to the main database file only after at least one transaction has committed.
> Also, how would this work with "Save As"?
SQLite also has a "backup" API that I think could be used for this purpose: https://sqlite.org/backup.html https://sqlite.org/backup.html