Enum deltalake::datafusion::sql::sqlparser::ast::BinaryOperator
source · pub enum BinaryOperator {
Show 37 variants
Plus,
Minus,
Multiply,
Divide,
Modulo,
StringConcat,
Gt,
Lt,
GtEq,
LtEq,
Spaceship,
Eq,
NotEq,
And,
Or,
Xor,
BitwiseOr,
BitwiseAnd,
BitwiseXor,
DuckIntegerDivide,
MyIntegerDivide,
Custom(String),
PGBitwiseXor,
PGBitwiseShiftLeft,
PGBitwiseShiftRight,
PGExp,
PGOverlap,
PGRegexMatch,
PGRegexIMatch,
PGRegexNotMatch,
PGRegexNotIMatch,
PGLikeMatch,
PGILikeMatch,
PGNotLikeMatch,
PGNotILikeMatch,
PGStartsWith,
PGCustomBinaryOperator(Vec<String>),
}
Expand description
Binary operators
Variants§
Plus
Plus, e.g. a + b
Minus
Minus, e.g. a - b
Multiply
Multiply, e.g. a * b
Divide
Divide, e.g. a / b
Modulo
Modulo, e.g. a % b
StringConcat
String/Array Concat operator, e.g. a || b
Gt
Greater than, e.g. a > b
Lt
Less than, e.g. a < b
GtEq
Greater equal, e.g. a >= b
LtEq
Less equal, e.g. a <= b
Spaceship
Spaceship, e.g. a <=> b
Eq
Equal, e.g. a = b
NotEq
Not equal, e.g. a <> b
And
And, e.g. a AND b
Or
Or, e.g. a OR b
Xor
XOR, e.g. a XOR b
BitwiseOr
Bitwise or, e.g. a | b
BitwiseAnd
Bitwise and, e.g. a & b
BitwiseXor
Bitwise XOR, e.g. a ^ b
DuckIntegerDivide
Integer division operator //
in DuckDB
MyIntegerDivide
MySQL DIV
integer division
Custom(String)
Support for custom operators (built by parsers outside this crate)
PGBitwiseXor
Bitwise XOR, e.g. a # b
(PostgreSQL-specific)
PGBitwiseShiftLeft
Bitwise shift left, e.g. a << b
(PostgreSQL-specific)
PGBitwiseShiftRight
Bitwise shift right, e.g. a >> b
(PostgreSQL-specific)
PGExp
Exponent, e.g. a ^ b
(PostgreSQL-specific)
PGOverlap
Overlap operator, e.g. a && b
(PostgreSQL-specific)
PGRegexMatch
String matches regular expression (case sensitively), e.g. a ~ b
(PostgreSQL-specific)
PGRegexIMatch
String matches regular expression (case insensitively), e.g. a ~* b
(PostgreSQL-specific)
PGRegexNotMatch
String does not match regular expression (case sensitively), e.g. a !~ b
(PostgreSQL-specific)
PGRegexNotIMatch
String does not match regular expression (case insensitively), e.g. a !~* b
(PostgreSQL-specific)
PGLikeMatch
String matches pattern (case sensitively), e.g. a ~~ b
(PostgreSQL-specific)
PGILikeMatch
String matches pattern (case insensitively), e.g. a ~~* b
(PostgreSQL-specific)
PGNotLikeMatch
String does not match pattern (case sensitively), e.g. a !~~ b
(PostgreSQL-specific)
PGNotILikeMatch
String does not match pattern (case insensitively), e.g. a !~~* b
(PostgreSQL-specific)
PGStartsWith
String “starts with”, eg: a ^@ b
(PostgreSQL-specific)
PGCustomBinaryOperator(Vec<String>)
PostgreSQL-specific custom operator.
See CREATE OPERATOR for more information.
Trait Implementations§
source§impl Clone for BinaryOperator
impl Clone for BinaryOperator
source§fn clone(&self) -> BinaryOperator
fn clone(&self) -> BinaryOperator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BinaryOperator
impl Debug for BinaryOperator
source§impl Display for BinaryOperator
impl Display for BinaryOperator
source§impl Hash for BinaryOperator
impl Hash for BinaryOperator
source§impl Ord for BinaryOperator
impl Ord for BinaryOperator
source§fn cmp(&self, other: &BinaryOperator) -> Ordering
fn cmp(&self, other: &BinaryOperator) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for BinaryOperator
impl PartialEq for BinaryOperator
source§fn eq(&self, other: &BinaryOperator) -> bool
fn eq(&self, other: &BinaryOperator) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for BinaryOperator
impl PartialOrd for BinaryOperator
source§fn partial_cmp(&self, other: &BinaryOperator) -> Option<Ordering>
fn partial_cmp(&self, other: &BinaryOperator) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Visit for BinaryOperator
impl Visit for BinaryOperator
source§impl VisitMut for BinaryOperator
impl VisitMut for BinaryOperator
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
impl Eq for BinaryOperator
impl StructuralPartialEq for BinaryOperator
Auto Trait Implementations§
impl Freeze for BinaryOperator
impl RefUnwindSafe for BinaryOperator
impl Send for BinaryOperator
impl Sync for BinaryOperator
impl Unpin for BinaryOperator
impl UnwindSafe for BinaryOperator
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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