pub struct Expression { /* private fields */ }Expand description
An owned, bound duckdb_expression (destroyed once on drop).
Implementations§
Source§impl Expression
impl Expression
Sourcepub fn return_type(&self) -> Option<LogicalType>
pub fn return_type(&self) -> Option<LogicalType>
The expression’s return type, or None if DuckDB reports none.
Sourcepub fn is_foldable(&self) -> bool
pub fn is_foldable(&self) -> bool
Whether the expression can be folded into a constant value.
Sourcepub fn fold(
&self,
context: &ClientContext<'_>,
) -> Result<DuckValue, EngineError>
pub fn fold( &self, context: &ClientContext<'_>, ) -> Result<DuckValue, EngineError>
Folds a foldable expression into a scalar DuckValue using context.
§Errors
Returns an EngineError if DuckDB reports a fold error, or if the folded
value is of a type this scalar extractor does not cover.
Trait Implementations§
Source§impl Drop for Expression
impl Drop for Expression
Auto Trait Implementations§
impl !Send for Expression
impl !Sync for Expression
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Unpin for Expression
impl UnsafeUnpin for Expression
impl UnwindSafe for Expression
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