pub struct ArrayFilter { /* private fields */ }Expand description
Represents a filter for checking if a column’s value is (or is not) in a given array of values.
This struct is used to build SQL IN or NOT IN conditions for queries, allowing you to
filter rows where a column matches any value in a provided array.
§Fields
column: The column to filter on, represented as an optional tuple of (table, column) names.values: A static slice ofValueitems to compare against the column.in_array: Iftrue, generates anINfilter; iffalse, generates aNOT INfilter.
Trait Implementations§
Source§impl Debug for ArrayFilter
impl Debug for ArrayFilter
Source§impl Filtered for ArrayFilter
impl Filtered for ArrayFilter
Source§fn column_one(&self) -> Option<&(String, String)>
fn column_one(&self) -> Option<&(String, String)>
Returns a reference to the first column involved in the filter, if any. Read more
Source§fn column_two(&self) -> Option<&(String, String)>
fn column_two(&self) -> Option<&(String, String)>
Returns a reference to the second column involved in the filter, if any. Read more
Source§fn filter_type(&self) -> FilterType
fn filter_type(&self) -> FilterType
Returns the type of filter (e.g., Eq, Lt, Gt, etc.).
Source§fn filter1(&self) -> Option<&dyn Filtered>
fn filter1(&self) -> Option<&dyn Filtered>
Returns a reference to the first sub-filter if this is a logical combinator. Read more
Source§fn array_values(&self) -> Option<&Vec<Value>>
fn array_values(&self) -> Option<&Vec<Value>>
Returns a reference to the array of values used in an array filter (e.g., IN/NOT IN), if any. Read more
Source§fn is_in_array(&self) -> Option<bool>
fn is_in_array(&self) -> Option<bool>
Returns
Some(true) for IN array filters, Some(false) for NOT IN, or None otherwise.Source§fn value(&self) -> Option<&Value>
fn value(&self) -> Option<&Value>
Returns a reference to the value being compared in the filter, if any. Read more
Source§fn is_or_filter(&self) -> bool
fn is_or_filter(&self) -> bool
Returns
true if this filter is a logical OR combinator.Source§fn is_and_filter(&self) -> bool
fn is_and_filter(&self) -> bool
Returns
true if this filter is a logical AND combinator.Source§fn filter2(&self) -> Option<&dyn Filtered>
fn filter2(&self) -> Option<&dyn Filtered>
Returns a reference to the second sub-filter if this is a logical combinator. Read more
Auto Trait Implementations§
impl Freeze for ArrayFilter
impl RefUnwindSafe for ArrayFilter
impl Send for ArrayFilter
impl Sync for ArrayFilter
impl Unpin for ArrayFilter
impl UnwindSafe for ArrayFilter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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