Implement the ``~`` operator. When used with SQL expressions, results in a NOT operation, equivalent to :func:`_expression.not_`, that is:: ~a is equivalent to:: from sqlalchemy import not_ not_(a)
(self)
| 246 | return self.operate(or_, other) |
| 247 | |
| 248 | def __invert__(self) -> Operators: |
| 249 | """Implement the ``~`` operator. |
| 250 | |
| 251 | When used with SQL expressions, results in a |
| 252 | NOT operation, equivalent to |
| 253 | :func:`_expression.not_`, that is:: |
| 254 | |
| 255 | ~a |
| 256 | |
| 257 | is equivalent to:: |
| 258 | |
| 259 | from sqlalchemy import not_ |
| 260 | |
| 261 | not_(a) |
| 262 | |
| 263 | """ |
| 264 | return self.operate(inv) |
| 265 | |
| 266 | def _null_operate(self, other: Any) -> Operators: |
| 267 | """A 'null' operation available on all types, used for testing.""" |