Implement the ``&`` operator. When used with SQL expressions, results in an AND operation, equivalent to :func:`_expression.and_`, that is:: a & b is equivalent to:: from sqlalchemy import and_ and_(a, b) Care should b
(self, other: Any)
| 196 | __slots__ = () |
| 197 | |
| 198 | def __and__(self, other: Any) -> Operators: |
| 199 | """Implement the ``&`` operator. |
| 200 | |
| 201 | When used with SQL expressions, results in an |
| 202 | AND operation, equivalent to |
| 203 | :func:`_expression.and_`, that is:: |
| 204 | |
| 205 | a & b |
| 206 | |
| 207 | is equivalent to:: |
| 208 | |
| 209 | from sqlalchemy import and_ |
| 210 | |
| 211 | and_(a, b) |
| 212 | |
| 213 | Care should be taken when using ``&`` regarding |
| 214 | operator precedence; the ``&`` operator has the highest precedence. |
| 215 | The operands should be enclosed in parenthesis if they contain |
| 216 | further sub expressions:: |
| 217 | |
| 218 | (a == 2) & (b == 4) |
| 219 | |
| 220 | """ |
| 221 | return self.operate(and_, other) |
| 222 | |
| 223 | def __or__(self, other: Any) -> Operators: |
| 224 | """Implement the ``|`` operator. |