Use sqlite3_prepare_v2()
When I'm working with SQLite3 databases in Jim, I find that I occasionally
get a 'schema has changed' error so I end up using catch to detect the
error and try the query again.
Here's a quick patch to change the SQLite3 extension to use the
sqlite3_prepare_v2() API function instead of sqlite3_prepare() - trivial
but the _v2() function has a number of benefits and everyone should have a
new enough SQLite3 library to support it. Please can you consider it for
inclusion?
See - http://www.sqlite.org/c3ref/prepare.html
The benefit I'm specifically interested in is:
With the _v2() variant, "If the database schema changes, instead of
returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will
automatically recompile the SQL statement and try to run it again."