pub struct QueryBuilder { /* private fields */ }Expand description
Builder for constructing complex queries
Implementations§
Source§impl QueryBuilder
impl QueryBuilder
Sourcepub fn eq(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn eq(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add an equality filter (Eq operator)
Sourcepub fn ne(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn ne(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add a not-equal filter (Ne operator)
Sourcepub fn gt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn gt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add a greater-than filter (Gt operator)
Sourcepub fn gte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn gte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add a greater-than-or-equal filter (Gte operator)
Sourcepub fn lt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn lt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add a less-than filter (Lt operator)
Sourcepub fn lte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn lte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
Add a less-than-or-equal filter (Lte operator)
Sourcepub fn in_array(self, field: impl Into<String>, values: Vec<Value>) -> Self
pub fn in_array(self, field: impl Into<String>, values: Vec<Value>) -> Self
Add an in-array filter (In operator)
Sourcepub fn nin(self, field: impl Into<String>, values: Vec<Value>) -> Self
pub fn nin(self, field: impl Into<String>, values: Vec<Value>) -> Self
Add a not-in-array filter (NotIn operator)
Sourcepub fn contains(
self,
field: impl Into<String>,
substring: impl Into<String>,
) -> Self
pub fn contains( self, field: impl Into<String>, substring: impl Into<String>, ) -> Self
Add a contains filter (substring match)
Sourcepub fn starts_with(
self,
field: impl Into<String>,
prefix: impl Into<String>,
) -> Self
pub fn starts_with( self, field: impl Into<String>, prefix: impl Into<String>, ) -> Self
Add a starts-with filter
Sourcepub fn ends_with(
self,
field: impl Into<String>,
suffix: impl Into<String>,
) -> Self
pub fn ends_with( self, field: impl Into<String>, suffix: impl Into<String>, ) -> Self
Add an ends-with filter
Sourcepub fn regex(self, field: impl Into<String>, pattern: impl Into<String>) -> Self
pub fn regex(self, field: impl Into<String>, pattern: impl Into<String>) -> Self
Add a regex filter (Note: not directly supported by server, use contains/starts_with/ends_with instead)
Sourcepub fn raw_filter(self, filter: Value) -> Self
pub fn raw_filter(self, filter: Value) -> Self
Add a raw filter expression
Sourcepub fn page(self, page: usize, page_size: usize) -> Self
pub fn page(self, page: usize, page_size: usize) -> Self
Set page number and page size (convenience method)
Sourcepub fn bypass_cache(self, bypass: bool) -> Self
pub fn bypass_cache(self, bypass: bool) -> Self
Bypass cache for this query
Sourcepub fn bypass_ripple(self, bypass: bool) -> Self
pub fn bypass_ripple(self, bypass: bool) -> Self
Bypass ripple for this query
Trait Implementations§
Source§impl Clone for QueryBuilder
impl Clone for QueryBuilder
Source§fn clone(&self) -> QueryBuilder
fn clone(&self) -> QueryBuilder
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 QueryBuilder
impl Debug for QueryBuilder
Source§impl Default for QueryBuilder
impl Default for QueryBuilder
Source§fn default() -> QueryBuilder
fn default() -> QueryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueryBuilder
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnwindSafe for QueryBuilder
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