Skip to main content

ReplacementScanInfo

Struct ReplacementScanInfo 

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

An interface to redirect an unresolved table reference during a replacement scan callback.

Implementations§

Source§

impl ReplacementScanInfo

Source

pub fn set_function_name(&self, function_name: &str) -> Result<()>

Rewrites the unresolved table reference into a call to the table function named function_name.

Must be called for the rewrite to take effect at all — if ReplacementScan::replace returns Ok(()) without ever calling this, DuckDB reports its normal “table not found” error, as if no replacement scan had run.

§Errors

Returns an error if function_name contains a NUL byte.

Source

pub fn add_parameter<T: DuckDialect>(&self, value: &T) -> Result<()>

Adds a literal parameter to the table function call being built, in the order added.

There is deliberately no way to bind a computed parameter that would require running SQL — see the module docs.

§Errors

Returns an error if value cannot be converted to a DuckDB value.

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.