pub enum BinaryOp {
Show 43 variants
Or,
And,
Eq,
NotEq,
Lt,
Gt,
LtEq,
GtEq,
IsDistinctFrom,
IsNotDistinctFrom,
Add,
Subtract,
Multiply,
Divide,
IntegerDivide,
Modulo,
Power,
BitAnd,
BitOr,
ShiftLeft,
ShiftRight,
Concat,
Like,
NotLike,
ILike,
NotILike,
Glob,
SimilarTo,
NotSimilarTo,
Regex,
RegexInsensitive,
NotRegexInsensitive,
Collate,
AtTimeZone,
Arrow,
LongArrow,
Contains,
ContainedBy,
Overlaps,
StartsWith,
InetContainedByOrEq,
InetContainsOrEq,
Named(StrRef),
}Expand description
An infix operator.
The list is the dialect and not a general idea of what operators are. Named is the one open
door, because OperatorLiteral in the grammar takes any run of operator characters that is not
already a token, and rejecting that here would reject SQL DuckDB accepts.
Variants§
Or
OR.
And
AND.
Eq
= or ==.
NotEq
!= or <>.
Lt
<.
Gt
>.
LtEq
<=.
GtEq
>=.
IsDistinctFrom
IS DISTINCT FROM.
IsNotDistinctFrom
IS NOT DISTINCT FROM.
Add
+.
Subtract
-.
Multiply
*.
Divide
/.
IntegerDivide
//, integer division.
Modulo
%.
Power
^ or **.
BitAnd
&.
BitOr
|.
ShiftLeft
<<.
ShiftRight
>>.
Concat
||.
Like
LIKE or ~~.
NotLike
NOT LIKE or !~~.
ILike
ILIKE or ~~*.
NotILike
NOT ILIKE or !~~*.
Glob
GLOB or ~~~.
SimilarTo
SIMILAR TO.
NotSimilarTo
!~, which the grammar calls the not-similar-to operator.
Regex
~, a regex match.
RegexInsensitive
~*, a case insensitive regex match.
NotRegexInsensitive
!~*, a negated case insensitive regex match.
Collate
COLLATE.
AtTimeZone
AT TIME ZONE.
Arrow
->.
LongArrow
->>.
Contains
@>, contains.
ContainedBy
<@, contained by.
Overlaps
&&, overlaps.
StartsWith
^@, starts with.
InetContainedByOrEq
<<=, an inet operator.
InetContainsOrEq
>>=, an inet operator.
Named(StrRef)
An operator the dialect does not name, which DuckDB resolves as a binary function of that
name. a <=> b is the shape.