pub enum BinaryOperator {
Show 50 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,
Arrow,
LongArrow,
HashArrow,
HashLongArrow,
AtAt,
AtArrow,
ArrowAt,
HashMinus,
AtQuestion,
Question,
QuestionAnd,
QuestionPipe,
PGCustomBinaryOperator(Vec<String>),
Overlaps,
}
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 (such as Postgres custom operators)
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)
Arrow
The ->
operator.
On PostgreSQL, this operator extracts a JSON object field or array
element, for example '{"a":"b"}'::json -> 'a'
or [1, 2, 3]'::json -> 2
.
See https://www.postgresql.org/docs/current/functions-json.html.
LongArrow
The ->>
operator.
On PostgreSQL, this operator extracts a JSON object field or JSON
array element and converts it to text, for example '{"a":"b"}'::json ->> 'a'
or [1, 2, 3]'::json ->> 2
.
See https://www.postgresql.org/docs/current/functions-json.html.
HashArrow
The #>
operator.
On PostgreSQL, this operator extracts a JSON sub-object at the specified path, for example:
'{"a": {"b": ["foo","bar"]}}'::json #> '{a,b,1}'
See https://www.postgresql.org/docs/current/functions-json.html.
HashLongArrow
The #>>
operator.
A PostgreSQL-specific operator that extracts JSON sub-object at the specified path, for example
'{"a": {"b": ["foo","bar"]}}'::json #>> '{a,b,1}'
See https://www.postgresql.org/docs/current/functions-json.html.
AtAt
The @@
operator.
On PostgreSQL, this is used for JSON and text searches.
See https://www.postgresql.org/docs/current/functions-json.html. See https://www.postgresql.org/docs/current/functions-textsearch.html.
AtArrow
The @>
operator.
On PostgreSQL, this is used for JSON and text searches.
See https://www.postgresql.org/docs/current/functions-json.html. See https://www.postgresql.org/docs/current/functions-textsearch.html.
ArrowAt
The <@
operator.
On PostgreSQL, this is used for JSON and text searches.
See https://www.postgresql.org/docs/current/functions-json.html. See https://www.postgresql.org/docs/current/functions-textsearch.html.
HashMinus
The #-
operator.
On PostgreSQL, this operator is used to delete a field or array element at a specified path.
See https://www.postgresql.org/docs/current/functions-json.html.
AtQuestion
The @?
operator.
On PostgreSQL, this operator is used to check the given JSON path returns an item for the JSON value.
See https://www.postgresql.org/docs/current/functions-json.html.
Question
The ?
operator.
On PostgreSQL, this operator is used to check whether a string exists as a top-level key within the JSON value
See https://www.postgresql.org/docs/current/functions-json.html.
QuestionAnd
The ?&
operator.
On PostgreSQL, this operator is used to check whether all of the the indicated array members exist as top-level keys.
See https://www.postgresql.org/docs/current/functions-json.html.
QuestionPipe
The ?|
operator.
On PostgreSQL, this operator is used to check whether any of the the indicated array members exist as top-level keys.
See https://www.postgresql.org/docs/current/functions-json.html.
PGCustomBinaryOperator(Vec<String>)
PostgreSQL-specific custom operator.
See CREATE OPERATOR for more information.
Overlaps
The OVERLAPS
operator
Specifies a test for an overlap between two datetime periods: https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#overlaps-predicate
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 more