pub struct ReplacementScanInfo { /* private fields */ }Expand description
An interface to redirect an unresolved table reference during a replacement scan callback.
Implementations§
Source§impl ReplacementScanInfo
impl ReplacementScanInfo
Sourcepub fn set_function_name(&self, function_name: &str) -> Result<()>
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.
Sourcepub fn add_parameter<T: DuckDialect>(&self, value: &T) -> Result<()>
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§
impl !Send for ReplacementScanInfo
impl !Sync for ReplacementScanInfo
impl Freeze for ReplacementScanInfo
impl RefUnwindSafe for ReplacementScanInfo
impl Unpin for ReplacementScanInfo
impl UnsafeUnpin for ReplacementScanInfo
impl UnwindSafe for ReplacementScanInfo
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
Mutably borrows from an owned value. Read more