@@ -28,8 +28,11 @@ use super::display_separated;
28
28
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
29
29
#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
30
30
pub enum UnaryOperator {
31
+ /// Plus, e.g. `+9`
31
32
Plus ,
33
+ /// Minus, e.g. `-9`
32
34
Minus ,
35
+ /// Not, e.g. `NOT(true)`
33
36
Not ,
34
37
/// Bitwise Not, e.g. `~9` (PostgreSQL-specific)
35
38
PGBitwiseNot ,
@@ -66,39 +69,67 @@ impl fmt::Display for UnaryOperator {
66
69
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
67
70
#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
68
71
pub enum BinaryOperator {
72
+ /// Plus, e.g. `a + b`
69
73
Plus ,
74
+ /// Minus, e.g. `a - b`
70
75
Minus ,
76
+ /// Multiply, e.g. `a * b`
71
77
Multiply ,
78
+ /// Divide, e.g. `a / b`
72
79
Divide ,
80
+ /// Modulo, e.g. `a % b`
73
81
Modulo ,
82
+ /// String/Array Concat operator, e.g. `a || b`
74
83
StringConcat ,
84
+ /// Greater than, e.g. `a > b`
75
85
Gt ,
86
+ /// Less than, e.g. `a < b`
76
87
Lt ,
88
+ /// Greater equal, e.g. `a >= b`
77
89
GtEq ,
90
+ /// Less equal, e.g. `a <= b`
78
91
LtEq ,
92
+ /// Spaceship, e.g. `a <=> b`
79
93
Spaceship ,
94
+ /// Equal, e.g. `a = b`
80
95
Eq ,
96
+ /// Not equal, e.g. `a <> b`
81
97
NotEq ,
98
+ /// And, e.g. `a AND b`
82
99
And ,
100
+ /// Or, e.g. `a OR b`
83
101
Or ,
102
+ /// XOR, e.g. `a XOR b`
84
103
Xor ,
104
+ /// Bitwise or, e.g. `a | b`
85
105
BitwiseOr ,
106
+ /// Bitwise and, e.g. `a & b`
86
107
BitwiseAnd ,
108
+ /// Bitwise XOR, e.g. `a ^ b`
87
109
BitwiseXor ,
88
110
/// Integer division operator `//` in DuckDB
89
111
DuckIntegerDivide ,
90
112
/// MySQL [`DIV`](https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html) integer division
91
113
MyIntegerDivide ,
92
114
/// Support for custom operators (built by parsers outside this crate)
93
115
Custom ( String ) ,
116
+ /// Bitwise XOR, e.g. `a # b` (PostgreSQL-specific)
94
117
PGBitwiseXor ,
118
+ /// Bitwise shift left, e.g. `a << b` (PostgreSQL-specific)
95
119
PGBitwiseShiftLeft ,
120
+ /// Bitwise shift right, e.g. `a >> b` (PostgreSQL-specific)
96
121
PGBitwiseShiftRight ,
122
+ /// Exponent, e.g. `a ^ b` (PostgreSQL-specific)
97
123
PGExp ,
124
+ /// Overlap operator, e.g. `a && b` (PostgreSQL-specific)
98
125
PGOverlap ,
126
+ /// String matches regular expression (case sensitively), e.g. `a ~ b` (PostgreSQL-specific)
99
127
PGRegexMatch ,
128
+ /// String matches regular expression (case insensitively), e.g. `a ~* b` (PostgreSQL-specific)
100
129
PGRegexIMatch ,
130
+ /// String does not match regular expression (case sensitively), e.g. `a !~ b` (PostgreSQL-specific)
101
131
PGRegexNotMatch ,
132
+ /// String does not match regular expression (case insensitively), e.g. `a !~* b` (PostgreSQL-specific)
102
133
PGRegexNotIMatch ,
103
134
/// PostgreSQL-specific custom operator.
104
135
///
0 commit comments