pub struct QueryBuilder { /* private fields */ }Expand description
Builder for constructing queries.
Implementations§
Source§impl QueryBuilder
impl QueryBuilder
pub fn new() -> Self
pub fn eq(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn ne(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn gt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn gte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn lt(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn lte(self, field: impl Into<String>, value: impl Into<Value>) -> Self
pub fn in_values(self, field: impl Into<String>, values: Vec<Value>) -> Self
pub fn exists(self, field: impl Into<String>, exists: bool) -> Self
pub fn contains( self, field: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn starts_with( self, field: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn ends_with( self, field: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn regex(self, field: impl Into<String>, pattern: impl Into<String>) -> Self
pub fn and(self, filters: Vec<Filter>) -> Self
pub fn or(self, filters: Vec<Filter>) -> Self
pub fn sort(self, field: impl Into<String>, ascending: bool) -> Self
pub fn skip(self, skip: usize) -> Self
pub fn limit(self, limit: usize) -> Self
pub fn project(self, fields: Vec<String>) -> Self
pub fn build(self) -> Query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryBuilder
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnsafeUnpin 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