pub struct FilteredResult { /* private fields */ }Expand description
Filtered result that applies a WHERE clause to an underlying result
This struct owns a pre-compiled RowFilter, avoiding per-row compilation. The filter is compiled once during construction and reused for every row.
Implementations§
Source§impl FilteredResult
impl FilteredResult
Sourcepub fn new(
inner: Box<dyn QueryResult>,
filter_expr: &Expression,
) -> Result<Self>
pub fn new( inner: Box<dyn QueryResult>, filter_expr: &Expression, ) -> Result<Self>
Create a new expression-filtered result
§Arguments
inner- The source result to filterfilter_expr- The WHERE clause expression
Returns an error if the filter expression cannot be compiled.
Sourcepub fn from_filter(inner: Box<dyn QueryResult>, filter: RowFilter) -> Self
pub fn from_filter(inner: Box<dyn QueryResult>, filter: RowFilter) -> Self
Create from a pre-built RowFilter
Use this when you have a RowFilter that was constructed with specific context (e.g., with_context for correlated subqueries).
Sourcepub fn with_defaults(
inner: Box<dyn QueryResult>,
filter_expr: Expression,
) -> Result<Self>
pub fn with_defaults( inner: Box<dyn QueryResult>, filter_expr: Expression, ) -> Result<Self>
Create with default function registry (static lifetime)
Trait Implementations§
Source§impl QueryResult for FilteredResult
impl QueryResult for FilteredResult
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
Source§fn last_insert_id(&self) -> i64
fn last_insert_id(&self) -> i64
Returns the last inserted ID for an INSERT operation
Source§fn last_error(&mut self) -> Option<Error>
fn last_error(&mut self) -> Option<Error>
Returns a pending error from the last
next() call, if any. Read moreSource§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<Row>> for zero-copy joins Read moreSource§fn estimated_count(&self) -> Option<usize>
fn estimated_count(&self) -> Option<usize>
Returns an estimate of the total number of rows in the result. Read more
Source§fn supports_typed_batches(&self) -> bool
fn supports_typed_batches(&self) -> bool
Whether the result can yield decoded typed column batches without
constructing a row/value object for every result record. Read more
Source§fn typed_batch_fallback_reason(&self) -> Option<TypedBatchFallbackReason>
fn typed_batch_fallback_reason(&self) -> Option<TypedBatchFallbackReason>
If
supports_typed_batches() is false, return the best semantic reason. Read moreSource§fn next_typed_batch(&mut self) -> Result<Option<TypedColumnBatch>, Error>
fn next_typed_batch(&mut self) -> Result<Option<TypedColumnBatch>, Error>
Advance to the next typed column batch. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FilteredResult
impl !Sync for FilteredResult
impl !UnwindSafe for FilteredResult
impl Freeze for FilteredResult
impl Send for FilteredResult
impl Unpin for FilteredResult
impl UnsafeUnpin for FilteredResult
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