SQLite Forum

vtable module - pass state from xColumn to callback
Login
Some more information: The xcolumn() method uses sqlite3_result_subtype() to tag the value with the column index (1-255) of the column being returned. The attr() function then uses sqlite3_value_subtype() to identify the column data for the current row and retrieve the its metadata according to the second argument.

The 8-bit limitation for the subtype code means it only works for virtual tables with less than 256 columns.