pub enum SqlPredicate {
Comparison {
left: Box<SqlExpression>,
operator: SqlComparisonOperator,
right: Box<SqlExpression>,
},
Null {
expression: Box<SqlExpression>,
operator: SqlNullOperator,
},
Pattern {
left: Box<SqlExpression>,
operator: SqlPatternOperator,
right: Box<SqlExpression>,
},
Logical {
left: Box<Self>,
operator: SqlLogicalOperator,
right: Box<Self>,
},
Not(Box<Self>),
}Expand description
Lightweight SQL predicate containers.
Variants§
Implementations§
Source§impl SqlPredicate
impl SqlPredicate
Sourcepub fn comparison(
left: SqlExpression,
operator: SqlComparisonOperator,
right: SqlExpression,
) -> Self
pub fn comparison( left: SqlExpression, operator: SqlComparisonOperator, right: SqlExpression, ) -> Self
Creates a comparison predicate.
Sourcepub fn null(expression: SqlExpression, operator: SqlNullOperator) -> Self
pub fn null(expression: SqlExpression, operator: SqlNullOperator) -> Self
Creates a null-check predicate.
Sourcepub fn pattern(
left: SqlExpression,
operator: SqlPatternOperator,
right: SqlExpression,
) -> Self
pub fn pattern( left: SqlExpression, operator: SqlPatternOperator, right: SqlExpression, ) -> Self
Creates a pattern or membership predicate.
Sourcepub fn logical(left: Self, operator: SqlLogicalOperator, right: Self) -> Self
pub fn logical(left: Self, operator: SqlLogicalOperator, right: Self) -> Self
Creates a logical predicate.
Trait Implementations§
Source§impl Clone for SqlPredicate
impl Clone for SqlPredicate
Source§fn clone(&self) -> SqlPredicate
fn clone(&self) -> SqlPredicate
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 moreSource§impl Debug for SqlPredicate
impl Debug for SqlPredicate
Source§impl Display for SqlPredicate
impl Display for SqlPredicate
Source§impl Hash for SqlPredicate
impl Hash for SqlPredicate
Source§impl Ord for SqlPredicate
impl Ord for SqlPredicate
Source§fn cmp(&self, other: &SqlPredicate) -> Ordering
fn cmp(&self, other: &SqlPredicate) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SqlPredicate
impl PartialEq for SqlPredicate
Source§fn eq(&self, other: &SqlPredicate) -> bool
fn eq(&self, other: &SqlPredicate) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SqlPredicate
impl PartialOrd for SqlPredicate
impl Eq for SqlPredicate
impl StructuralPartialEq for SqlPredicate
Auto Trait Implementations§
impl Freeze for SqlPredicate
impl RefUnwindSafe for SqlPredicate
impl Send for SqlPredicate
impl Sync for SqlPredicate
impl Unpin for SqlPredicate
impl UnsafeUnpin for SqlPredicate
impl UnwindSafe for SqlPredicate
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