pub struct ScanArgs<'a> {
filters: Option<&'a [Expr]>,
projection: Option<&'a [usize]>,
limit: Option<usize>,
}Expand description
Arguments for scanning a table with TableProvider::scan_with_args.
Fields§
§filters: Option<&'a [Expr]>§projection: Option<&'a [usize]>§limit: Option<usize>Implementations§
Source§impl<'a> ScanArgs<'a>
impl<'a> ScanArgs<'a>
Sourcepub fn with_projection(self, projection: Option<&'a [usize]>) -> Self
pub fn with_projection(self, projection: Option<&'a [usize]>) -> Self
Set the column projection for the scan.
The projection is a list of column indices from TableProvider::schema
that should be included in the scan results. If None, all columns are included.
§Arguments
projection- Optional slice of column indices to project
Sourcepub fn projection(&self) -> Option<&'a [usize]>
pub fn projection(&self) -> Option<&'a [usize]>
Get the column projection for the scan.
Returns a reference to the projection column indices, or None if
no projection was specified (meaning all columns should be included).
Sourcepub fn with_filters(self, filters: Option<&'a [Expr]>) -> Self
pub fn with_filters(self, filters: Option<&'a [Expr]>) -> Self
Set the filter expressions for the scan.
Filters are boolean expressions that should be evaluated during the scan
to reduce the number of rows returned. All expressions are combined with AND logic.
Whether filters are actually pushed down depends on TableProvider::supports_filters_pushdown.
§Arguments
filters- Optional slice of filter expressions
Sourcepub fn filters(&self) -> Option<&'a [Expr]>
pub fn filters(&self) -> Option<&'a [Expr]>
Get the filter expressions for the scan.
Returns a reference to the filter expressions, or None if no filters were specified.
Sourcepub fn with_limit(self, limit: Option<usize>) -> Self
pub fn with_limit(self, limit: Option<usize>) -> Self
Set the maximum number of rows to return from the scan.
If specified, the scan should return at most this many rows. This is typically
used to optimize queries with LIMIT clauses.
§Arguments
limit- Optional maximum number of rows to return
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ScanArgs<'a>
impl<'a> !RefUnwindSafe for ScanArgs<'a>
impl<'a> Send for ScanArgs<'a>
impl<'a> Sync for ScanArgs<'a>
impl<'a> Unpin for ScanArgs<'a>
impl<'a> !UnwindSafe for ScanArgs<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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