Skip to main content

Module table

Module table 

Source
Expand description

DuckDB table functions: functions used in a FROM clause that produce rows and columns. DuckDB table functions: functions used in a FROM clause that produce rows and columns, e.g. SELECT * FROM my_func(1, 2).

Structs§

BindInfo
An interface to store and retrieve data during the table function’s bind stage.
InitInfo
An interface to store and retrieve data during the table function’s init stage.
TableFunctionInfo
An interface to store and retrieve data during the table function’s execution stage.
TableInitData
The InitData shape shared by every #[duckdb_table_function]-generated VTab impl: a lazily consumed iterator of output rows, behind a Mutex so it can be shared across the worker threads DuckDB may execute the scan on.

Traits§

TableRow
One output row of a table function: a tuple of values, one per column, in column order.
VTab
A DuckDB table function: produces rows and columns for use in a FROM clause, e.g. SELECT * FROM my_func(1, 2).
VTabLocalInit
A VTab that also produces per-worker-thread (“local”) init data, in addition to the query-wide init data every VTab already produces.

Functions§

run_table_func
Pulls up to output.capacity() rows from init_data’s iterator and writes them into output, then sets output’s row count. Exhaustion is signalled by writing fewer rows than the capacity (including zero), which is what DataChunkHandle::set_len communicates to DuckDB either way.