pub struct ExprMappedResult { /* private fields */ }Expand description
Expression-based mapped result with pre-compiled projections
This struct pre-compiles all expressions during construction, providing efficient per-row evaluation through the Expression VM.
Implementations§
Source§impl ExprMappedResult
impl ExprMappedResult
Sourcepub fn new(
inner: Box<dyn QueryResult>,
expressions: Vec<Expression>,
output_columns: Vec<String>,
) -> Result<Self>
pub fn new( inner: Box<dyn QueryResult>, expressions: Vec<Expression>, output_columns: Vec<String>, ) -> Result<Self>
Create a new expression-mapped result
§Arguments
inner- The source result to projectexpressions- The projection expressionsoutput_columns- Names for the output columns
Returns an error if any expression cannot be compiled.
Sourcepub fn with_defaults(
inner: Box<dyn QueryResult>,
expressions: Vec<Expression>,
output_columns: Vec<String>,
) -> Self
pub fn with_defaults( inner: Box<dyn QueryResult>, expressions: Vec<Expression>, output_columns: Vec<String>, ) -> Self
Create with default function registry (static lifetime)
This is a convenience method that panics on compilation errors.
For fallible construction, use new() instead.
Trait Implementations§
Source§impl QueryResult for ExprMappedResult
impl QueryResult for ExprMappedResult
Source§fn scan(&self, dest: &mut [Value]) -> Result<()>
fn scan(&self, dest: &mut [Value]) -> Result<()>
Scans the current row into the provided values Read more
Source§fn rows_affected(&self) -> i64
fn rows_affected(&self) -> i64
Returns the number of rows affected by an INSERT, UPDATE, or DELETE Read more
Source§fn last_insert_id(&self) -> i64
fn last_insert_id(&self) -> i64
Returns the last inserted ID for an INSERT operation Read more
Source§fn with_aliases(
self: Box<Self>,
aliases: FxHashMap<String, String>,
) -> Box<dyn QueryResult>
fn with_aliases( self: Box<Self>, aliases: FxHashMap<String, String>, ) -> Box<dyn QueryResult>
Sets column aliases for this result Read more
Source§fn columns_arc(&self) -> Option<CompactArc<Vec<String>>>
fn columns_arc(&self) -> Option<CompactArc<Vec<String>>>
Returns column names as Arc for zero-copy sharing Read more
Source§fn try_into_arc_rows(&mut self) -> Option<CompactArc<Vec<Row>>>
fn try_into_arc_rows(&mut self) -> Option<CompactArc<Vec<Row>>>
Try to extract all rows as CompactArc<Vec> for zero-copy joins Read more
impl Send for ExprMappedResult
Auto Trait Implementations§
impl Freeze for ExprMappedResult
impl !RefUnwindSafe for ExprMappedResult
impl !Sync for ExprMappedResult
impl Unpin for ExprMappedResult
impl !UnwindSafe for ExprMappedResult
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
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>
Converts
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>
Converts
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