Struct BindInfo

Source
pub struct BindInfo { /* private fields */ }
Expand description

An interface to store and retrieve data during the function bind stage

Implementations§

Source§

impl BindInfo

Source

pub fn add_result_column(&self, column_name: &str, column_type: LogicalType)

Adds a result column to the output of the table function.

§Arguments
  • name: The name of the column
  • type: The logical type of the column
Source

pub fn set_error(&self, error: &str)

Report that an error has occurred while calling bind.

§Arguments
  • error: The error message
Source

pub unsafe fn set_bind_data( &self, data: *mut c_void, free_function: Option<unsafe extern "C" fn(*mut c_void)>, )

Sets the user-provided bind data in the bind object. This object can be retrieved again during execution.

§Arguments
  • extra_data: The bind data object.
  • destroy: The callback that will be called to destroy the bind data (if any)
§Safety
Source

pub fn get_parameter_count(&self) -> u64

Retrieves the number of regular (non-named) parameters to the function.

Source

pub fn get_parameter(&self, param_index: u64) -> Value

Retrieves the parameter at the given index.

§Arguments
  • index: The index of the parameter to get

returns: The value of the parameter

Source

pub fn set_cardinality(&self, cardinality: idx_t, is_exact: bool)

Sets the cardinality estimate for the table function, used for optimization.

§Arguments
  • cardinality: The cardinality estimate
  • is_exact: Whether or not the cardinality estimate is exact, or an approximation
Source

pub fn get_extra_info<T>(&self) -> *const T

Retrieves the extra info of the function as set in TableFunction::set_extra_info

§Arguments
  • returns: The extra info

Trait Implementations§

Source§

impl Debug for BindInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<*mut c_void> for BindInfo

Source§

fn from(ptr: duckdb_bind_info) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.