On 4 Jul 2013, at 8:15pm, James K. Lowden <jklow...@schemamania.org> wrote:

> It doesn't usually matter, right?  The fact that the atomic SELECT is
> spread out across N function calls is irrelevant if they are executed
> in uninterrupted sequence, because other connections are blocked from
> modifying the affected tables until the SELECT is finalized.  

Right.  The supported, cannonical, predictable, deterministic way to use 
_prepare() is to get all the way from _prepare() to _finalize() without doing 
anything but use that statement.  And if you do that it doesn’t matter 
precisely which call does the lock and which one does the unlock.

In real life SQLite allows many other things to happen.  But predicting what 
happens then requires a detailed understanding of SQLite.  Which means you’re 
starting to mess with things that can change with different versions.  Which is 
to be avoided unless it’s really useful to you.

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

Reply via email to