pub struct FilterBuilder<P = ()> { /* private fields */ }Implementations§
Source§impl FilterBuilder<()>
impl FilterBuilder<()>
Sourcepub fn build(self) -> FilterParams
pub fn build(self) -> FilterParams
Finish and return only the filters
Source§impl<P> FilterBuilder<P>
impl<P> FilterBuilder<P>
Sourcepub fn with_parent(parent: P) -> Self
pub fn with_parent(parent: P) -> Self
Create with parent
pub fn eq(self, field: impl Into<String>, value: impl Into<FilterValue>) -> Self
pub fn ne(self, field: impl Into<String>, value: impl Into<FilterValue>) -> Self
pub fn gt(self, field: impl Into<String>, value: impl Into<FilterValue>) -> Self
pub fn lt(self, field: impl Into<String>, value: impl Into<FilterValue>) -> Self
pub fn gte( self, field: impl Into<String>, value: impl Into<FilterValue>, ) -> Self
pub fn lte( self, field: impl Into<String>, value: impl Into<FilterValue>, ) -> Self
Sourcepub fn like(self, field: impl Into<String>, pat: impl Into<String>) -> Self
pub fn like(self, field: impl Into<String>, pat: impl Into<String>) -> Self
Safe LIKE operator - automatically escapes special characters (% and _). Use this for user input to prevent wildcard injection.
Sourcepub fn ilike(self, field: impl Into<String>, pat: impl Into<String>) -> Self
pub fn ilike(self, field: impl Into<String>, pat: impl Into<String>) -> Self
Case-insensitive LIKE operator - automatically escapes special characters. Safe for user input.
Sourcepub fn like_pattern(
self,
field: impl Into<String>,
pat: impl Into<String>,
) -> Self
pub fn like_pattern( self, field: impl Into<String>, pat: impl Into<String>, ) -> Self
Unsafe LIKE operator - allows intentional wildcards (% and _). WARNING: Only use with controlled input, never with direct user input. Use this when you intentionally want wildcard behavior.
pub fn in( self, field: impl Into<String>, values: impl IntoIterator<Item = impl Into<FilterValue>>, ) -> Self
Sourcepub fn in_values(
self,
field: impl Into<String>,
values: impl IntoIterator<Item = impl Into<FilterValue>>,
) -> Self
pub fn in_values( self, field: impl Into<String>, values: impl IntoIterator<Item = impl Into<FilterValue>>, ) -> Self
Alias for r#in
pub fn not_in( self, field: impl Into<String>, values: impl IntoIterator<Item = impl Into<FilterValue>>, ) -> Self
pub fn between( self, field: impl Into<String>, min: impl Into<FilterValue>, max: impl Into<FilterValue>, ) -> Self
pub fn is_null(self, field: impl Into<String>) -> Self
pub fn is_not_null(self, field: impl Into<String>) -> Self
pub fn contains( self, field: impl Into<String>, value: impl Into<FilterValue>, ) -> Self
Trait Implementations§
Source§impl Debug for FilterBuilder<()>
impl Debug for FilterBuilder<()>
Source§impl Default for FilterBuilder<()>
impl Default for FilterBuilder<()>
Source§impl IntoParams for FilterBuilder<()>
impl IntoParams for FilterBuilder<()>
fn into_params(self) -> Params
Auto Trait Implementations§
impl<P> Freeze for FilterBuilder<P>where
P: Freeze,
impl<P> RefUnwindSafe for FilterBuilder<P>where
P: RefUnwindSafe,
impl<P> Send for FilterBuilder<P>where
P: Send,
impl<P> Sync for FilterBuilder<P>where
P: Sync,
impl<P> Unpin for FilterBuilder<P>where
P: Unpin,
impl<P> UnwindSafe for FilterBuilder<P>where
P: UnwindSafe,
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