vendredi 15 janvier 2016

Are the column count and column decltypes invariant for the duration of the execution of a SQLite prepared statement?

When I look at code other folks have written using the SQLite3 C API, I find sqlite3_column_decltype and sqlite3_column_count are called from the inner loop (once per result row).

My understanding of this database is that these values will never change even if the statement is re-compiled (see the bit about sqlite3_prepare_v2).

So I should be able to call these once and cache them immediately after the call to sqlite3_prepare.

Aucun commentaire:

Enregistrer un commentaire