On 10 Nov 2013, at 10:30pm, L. Wood <lwoo...@live.com> wrote: > SQLite creates a -journal file for each single transaction. But what exactly > is "one transaction" and when does it happen in terms of the C functions? > > For instance, can we safely say that the successive calls > > _prepare_v2() > _step() > ... > _step() > _finalize() > > always and everywhere constitute one transaction and hence, involve a single > -journal file?
No. However, they cannot constitute /more/ than one transaction because they area all part of a single SQL operation. You can create your own transactions using BEGIN. If you do this, you can put any number of operations in that transaction until you use END/COMMIT to end it, or a number of other things to abandon it. If you start a SQLite operation that requires access to the database (SELECT, INSERT, DELETE, UPDATE) and have not already started a transaction, SQLite helpfully wraps that single operation in a transaction for you. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users