See :meth:`.ColumnOperators.__inv__`.
(
expr: ColumnElement[Any], op: OperatorType, **kw: Any
)
| 251 | |
| 252 | |
| 253 | def _inv_impl( |
| 254 | expr: ColumnElement[Any], op: OperatorType, **kw: Any |
| 255 | ) -> ColumnElement[Any]: |
| 256 | """See :meth:`.ColumnOperators.__inv__`.""" |
| 257 | |
| 258 | # undocumented element currently used by the ORM for |
| 259 | # relationship.contains() |
| 260 | if hasattr(expr, "negation_clause"): |
| 261 | return expr.negation_clause |
| 262 | else: |
| 263 | return expr._negate() |
| 264 | |
| 265 | |
| 266 | def _neg_impl( |