pub enum Comparison {
Equal(ParseValue),
NotEqual(ParseValue),
GreaterThan(ParseValue),
GreaterThanOrEqual(ParseValue),
LessThan(ParseValue),
LessThanOrEqual(ParseValue),
In(Vec<ParseValue>),
NotIn(Vec<ParseValue>),
Exists(bool),
}Expand description
How one field is compared to one value.
Variants§
Equal(ParseValue)
Bare equality: {"field": value}.
NotEqual(ParseValue)
GreaterThan(ParseValue)
GreaterThanOrEqual(ParseValue)
LessThan(ParseValue)
LessThanOrEqual(ParseValue)
In(Vec<ParseValue>)
NotIn(Vec<ParseValue>)
Exists(bool)
Implementations§
Source§impl Comparison
impl Comparison
Sourcepub fn from_operator(op: &str, value: ParseValue) -> Result<Self, ParseError>
pub fn from_operator(op: &str, value: ParseValue) -> Result<Self, ParseError>
Map a Parse $ operator onto a comparison.
Returns INVALID_QUERY for anything unsupported. That is the whole point: the alternative,
ignoring it, returns more rows than the caller asked for.
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnsafeUnpin for Comparison
impl UnwindSafe for Comparison
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