On 29 Jul 2018, at 12:56pm, Robert M. Münch <robert.mue...@saphirion.com> wrote:

> I want to add an autosave feature that stores some data at critical 
> points/specific intervals. This data of course should be commited to disk, to 
> survive any app crashes.

Use a SAVEPOINT instead of COMMIT:

<https://www.sqlite.org/lang_savepoint.html>

Your use of an open transaction here is sort-of abuse of how SQLite works.  You 
have no real control over what is flashed to disk.  Rather than relying on 
side-effects of transactions it might be better to make your own data structure 
which reflects which tranche of data a transaction is in.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to