You are also completely free to reference your own data structures by name
from your custom extension.
Thinking about this, it occurs to me again, it would help many if SQLite
also had the similar sqlite3_get_data() and sqlite3_set_data() per
connection. In your case you could organize your data on the connection
and use trace hook to keep it relevant to extension function query(s). As
it stands the only connection level object appears to be a custom VFS shim
which is overkill for this.
Does DRH read these posts? The question is why isn't there a connection
level get/set cache API similar to the auxdata calls?
On Tue, Nov 21, 2017 at 3:03 PM, Stadin, Benjamin <
[hidden email]> wrote:
> I register a custom SQL function using dms_create_function_v2, and in the
> C callback I create a rather heavy C++ helper class which I need to prepare
> the result.
> I currently use sqlite3_get_auxdata and sqlite3_set_auxdata, but my
> problem is that the finalization callback of sqlite3_set_auxdata is called
> after each step().
> Is there a way to hook into sqlite3_finalize(), in order to manage the
> lifecycle of application data that is created together with a statement and
> to be destroyed once the statement is finalized?
> sqlite-users mailing list
> [hidden email] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >