pub struct InitInfo<V: VTab> { /* private fields */ }Expand description
An interface to store and retrieve data during the table function’s init stage.
Implementations§
Source§impl<V: VTab> InitInfo<V>
impl<V: VTab> InitInfo<V>
Sourcepub fn bind_data(&self) -> &V::BindData
pub fn bind_data(&self) -> &V::BindData
The bind data produced by VTab::bind for this call.
Read-only: for tracking state across calls to the execution callback, store it in the init data instead.
Sourcepub fn set_max_threads(&self, max_threads: u64)
pub fn set_max_threads(&self, max_threads: u64)
Sets how many threads may call the execution callback for this query in
parallel. Defaults to 1 (single-threaded execution).
Sourcepub fn column_indices(&self) -> Vec<usize>
pub fn column_indices(&self) -> Vec<usize>
The 0-based indices, into the function’s full result schema, of the
columns the query actually needs — only meaningful when the function
declared supports_projection_pushdown(). Empty if pushdown wasn’t
requested or the function didn’t opt in, in which case every column
should be written.
Sourcepub fn extra_info<T>(&self) -> Option<&T>
pub fn extra_info<T>(&self) -> Option<&T>
The registration-time “extra info”, if any — see BindInfo::extra_info.
§Safety
The caller must request the same T that was stored at registration
time; there is no runtime type check.