Implement the ``|`` operator. When used with SQL expressions, results in an OR operation, equivalent to :func:`_expression.or_`, that is:: a | b is equivalent to:: from sqlalchemy import or_ or_(a, b) Care should be ta
(self, other: Any)
| 221 | return self.operate(and_, other) |
| 222 | |
| 223 | def __or__(self, other: Any) -> Operators: |
| 224 | """Implement the ``|`` operator. |
| 225 | |
| 226 | When used with SQL expressions, results in an |
| 227 | OR operation, equivalent to |
| 228 | :func:`_expression.or_`, that is:: |
| 229 | |
| 230 | a | b |
| 231 | |
| 232 | is equivalent to:: |
| 233 | |
| 234 | from sqlalchemy import or_ |
| 235 | |
| 236 | or_(a, b) |
| 237 | |
| 238 | Care should be taken when using ``|`` regarding |
| 239 | operator precedence; the ``|`` operator has the highest precedence. |
| 240 | The operands should be enclosed in parenthesis if they contain |
| 241 | further sub expressions:: |
| 242 | |
| 243 | (a == 2) | (b == 4) |
| 244 | |
| 245 | """ |
| 246 | return self.operate(or_, other) |
| 247 | |
| 248 | def __invert__(self) -> Operators: |
| 249 | """Implement the ``~`` operator. |