MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __invert__

Method __invert__

lib/sqlalchemy/sql/operators.py:248–264  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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."""

Callers 1

not_Function · 0.45

Calls 1

operateMethod · 0.95

Tested by

no test coverage detected