Enum sqlparser::ast::BinaryOperator
source · pub enum BinaryOperator {
Show 32 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,
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)
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<'de> Deserialize<'de> for BinaryOperator
impl<'de> Deserialize<'de> for BinaryOperator
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 more