pub struct TableFunction { /* private fields */ }Expand description
A function that returns a queryable table
Implementations§
Source§impl TableFunction
impl TableFunction
Sourcepub fn supports_pushdown(&self, supports: bool) -> &Self
pub fn supports_pushdown(&self, supports: bool) -> &Self
Sets whether or not the given table function supports projection pushdown.
If this is set to true, the system will provide a list of all required columns in the init stage through
the InitInfo::get_column_indices method.
If this is set to false (the default), the system will expect all columns to be projected.
§Arguments
pushdown: True if the table function supports projection pushdown, false otherwise.
Sourcepub fn add_parameter(&self, logical_type: &LogicalTypeHandle) -> &Self
pub fn add_parameter(&self, logical_type: &LogicalTypeHandle) -> &Self
Sourcepub fn add_named_parameter(
&self,
name: &str,
logical_type: &LogicalTypeHandle,
) -> &Self
pub fn add_named_parameter( &self, name: &str, logical_type: &LogicalTypeHandle, ) -> &Self
Adds a named parameter to the table function.
§Arguments
name: The name of the parameter to add.logical_type: The type of the parameter to add.
Sourcepub fn set_function(
&self,
func: Option<unsafe extern "C" fn(info: duckdb_function_info, output: duckdb_data_chunk)>,
) -> &Self
pub fn set_function( &self, func: Option<unsafe extern "C" fn(info: duckdb_function_info, output: duckdb_data_chunk)>, ) -> &Self
Sourcepub fn set_init(
&self,
init_func: Option<unsafe extern "C" fn(duckdb_init_info)>,
) -> &Self
pub fn set_init( &self, init_func: Option<unsafe extern "C" fn(duckdb_init_info)>, ) -> &Self
Sourcepub fn set_bind(
&self,
bind_func: Option<unsafe extern "C" fn(duckdb_bind_info)>,
) -> &Self
pub fn set_bind( &self, bind_func: Option<unsafe extern "C" fn(duckdb_bind_info)>, ) -> &Self
Sourcepub unsafe fn set_extra_info_raw(
&self,
extra_info: *mut c_void,
destroy: duckdb_delete_callback_t,
)
pub unsafe fn set_extra_info_raw( &self, extra_info: *mut c_void, destroy: duckdb_delete_callback_t, )
Assigns extra information to the table function using raw pointers.
For most use cases, prefer set_extra_info which handles memory management automatically.
§Arguments
extra_info: The extra information as a raw pointerdestroy: The callback that will be called to destroy the data (if any)
§Safety
The caller must ensure that extra_info is a valid pointer and that destroy
properly cleans up the data when called.
Sourcepub fn set_extra_info<T>(&self, info: T) -> &Self
pub fn set_extra_info<T>(&self, info: T) -> &Self
Assigns extra information to the table function that can be fetched during binding, init, and execution.
§Arguments
info: The extra information to store
Sourcepub fn set_local_init(&self, init: duckdb_table_function_init_t)
pub fn set_local_init(&self, init: duckdb_table_function_init_t)
Trait Implementations§
Source§impl Debug for TableFunction
impl Debug for TableFunction
Source§impl Default for TableFunction
impl Default for TableFunction
Auto Trait Implementations§
impl Freeze for TableFunction
impl RefUnwindSafe for TableFunction
impl !Send for TableFunction
impl !Sync for TableFunction
impl Unpin for TableFunction
impl UnsafeUnpin for TableFunction
impl UnwindSafe for TableFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more