pub struct QueryOptions {
pub filter: Option<QueryFilter>,
pub sort: Option<Vec<SortField>>,
pub limit: Option<u32>,
pub offset: Option<u32>,
pub aggregate: Option<AggregateOptions>,
}Expand description
Options for querying documents (filter, sort, limit, offset).
Fields§
§filter: Option<QueryFilter>Optional filter to select documents
sort: Option<Vec<SortField>>Optional sort order (multiple fields supported)
limit: Option<u32>Optional limit on number of results
offset: Option<u32>Optional offset for pagination
aggregate: Option<AggregateOptions>When set, returns aggregated groups instead of documents.
Implementations§
Source§impl QueryOptions
impl QueryOptions
Sourcepub fn with_filter(self, filter: QueryFilter) -> Self
pub fn with_filter(self, filter: QueryFilter) -> Self
Set the filter.
Sourcepub fn with_limit(self, limit: u32) -> Self
pub fn with_limit(self, limit: u32) -> Self
Set the limit.
Sourcepub fn with_offset(self, offset: u32) -> Self
pub fn with_offset(self, offset: u32) -> Self
Set the offset.
Sourcepub fn with_aggregate(self, aggregate: AggregateOptions) -> Self
pub fn with_aggregate(self, aggregate: AggregateOptions) -> Self
Set the aggregation options.
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryOptions
impl Debug for QueryOptions
Source§impl Default for QueryOptions
impl Default for QueryOptions
Source§fn default() -> QueryOptions
fn default() -> QueryOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueryOptions
impl RefUnwindSafe for QueryOptions
impl Send for QueryOptions
impl Sync for QueryOptions
impl Unpin for QueryOptions
impl UnsafeUnpin for QueryOptions
impl UnwindSafe for QueryOptions
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