On 7/16/2013 12:54 PM, Riccardo Vianello wrote:
according to the documentation for sqlite3_get_auxdata and
sqlite3_set_auxdata "[...] metadata is preserved between function
calls for expressions that are constant at compile time. This includes
literal values and parameters.".

Does the binding of values affect the lifetime of the metadata
eventually associated to the parameters? I would find it useful if
auxiliary data were destroyed when the parameter is assigned a new
value, but it seems to me that this is not the case.

The metadata only survives a single iteration over the statement; in other words, it is cleared when you call sqlite3_reset (from the documentation: "SQLite will invoke the destructor function... when the SQL statement completes"). And you can't rebind the parameter in the middle of an iteration. So it looks like everything should work the way you want.
--
Igor Tandetnik

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

Reply via email to