SQLite Forum

vtable module - pass state from xColumn to callback
Login
I'm implementing a vtable module.

In `xColumn`, I call `sqlite3_result_*` to produce the value, but I also have additional metadata about the value (say, a `void*`) that I need to make available to the callback passed to `sqlite3_exec`.

The problem is that the only state I have (4th arg to `sqlite3_exec`, then 1st arg to callback), is not available when `xColumn` is called. And whatever state I might have in `xColumn` is not available at callback time.

Is there a preferred way to make some state (e.g., the one I have at `sqlite3_exec` time) available at `xColumn` time?