4 ms·
You could get SQLite to work as document files exposed to the user so long as you use sessions[1]. When a file is opened, copy the DB to a temporary file or to
by slaymaker1907 6y ago
You could get SQLite to work as document files exposed to the user so long as you use sessions[1]. When a file is opened, copy the DB to a temporary file or to use memory and write all changes during operation to this new DB, recording them all in a session. When the user explicitly saves a document, apply the session to the real DB.
[1]: https://www.sqlite.org/sessionintro.html#:~:text=1%20Introduction%20The%20session%20extension%20provide%20a%20mechanism,the%20sessions%20extension.%203.1.%20...%204%20Extended%20Functionality https://www.sqlite.org/sessionintro.html#:~:text=1%20Introdu...
- yarcob 6y agoThat doesn't sounds like it would just combine the drawbacks of both approaches: You end up with slow open/save operations, and the writes to the db still aren't necessarily atomic (eg. if a user copies the file while changes are being applied)