pub enum Compare<'a> {
Show 18 variants
Equals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
NotEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
LessThan(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
LessThanOrEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
GreaterThan(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
GreaterThanOrEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
In(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
NotIn(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
Like(Box<DatabaseValue<'a>>, Cow<'a, str>),
NotLike(Box<DatabaseValue<'a>>, Cow<'a, str>),
BeginsWith(Box<DatabaseValue<'a>>, Cow<'a, str>),
NotBeginsWith(Box<DatabaseValue<'a>>, Cow<'a, str>),
EndsInto(Box<DatabaseValue<'a>>, Cow<'a, str>),
NotEndsInto(Box<DatabaseValue<'a>>, Cow<'a, str>),
Null(Box<DatabaseValue<'a>>),
NotNull(Box<DatabaseValue<'a>>),
Between(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
NotBetween(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>),
}
Expand description
For modeling comparison expression
Variants§
Equals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left = right
NotEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left <> right
LessThan(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left < right
LessThanOrEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left <= right
GreaterThan(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left > right
GreaterThanOrEquals(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left >= right
In(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left IN (..)
NotIn(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
left NOT IN (..)
Like(Box<DatabaseValue<'a>>, Cow<'a, str>)
left LIKE %..%
NotLike(Box<DatabaseValue<'a>>, Cow<'a, str>)
left NOT LIKE %..%
BeginsWith(Box<DatabaseValue<'a>>, Cow<'a, str>)
left LIKE ..%
NotBeginsWith(Box<DatabaseValue<'a>>, Cow<'a, str>)
left NOT LIKE ..%
EndsInto(Box<DatabaseValue<'a>>, Cow<'a, str>)
left LIKE %..
NotEndsInto(Box<DatabaseValue<'a>>, Cow<'a, str>)
left NOT LIKE %..
Null(Box<DatabaseValue<'a>>)
value IS NULL
NotNull(Box<DatabaseValue<'a>>)
value IS NOT NULL
Between(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
value
BETWEEN left
AND right
NotBetween(Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>, Box<DatabaseValue<'a>>)
value
NOT BETWEEN left
AND right
Trait Implementations§
Source§impl<'a> From<Compare<'a>> for ConditionTree<'a>
impl<'a> From<Compare<'a>> for ConditionTree<'a>
Source§impl<'a> From<Compare<'a>> for Expression<'a>
impl<'a> From<Compare<'a>> for Expression<'a>
impl<'a> StructuralPartialEq for Compare<'a>
Auto Trait Implementations§
impl<'a> Freeze for Compare<'a>
impl<'a> RefUnwindSafe for Compare<'a>
impl<'a> Send for Compare<'a>
impl<'a> Sync for Compare<'a>
impl<'a> Unpin for Compare<'a>
impl<'a> UnwindSafe for Compare<'a>
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