MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _negate

Method _negate

lib/sqlalchemy/sql/elements.py:754–759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

752 return self._negate()
753
754 def _negate(self) -> ClauseElement:
755 # TODO: this code is uncovered and in all likelihood is not included
756 # in any codepath. So this should raise NotImplementedError in 2.1
757 grouped = self.self_group(against=operators.inv)
758 assert isinstance(grouped, ColumnElement)
759 return UnaryExpression(grouped, operator=operators.inv)
760
761 def __bool__(self):
762 raise TypeError("Boolean value of this clause is not defined")

Callers 1

__invert__Method · 0.95

Calls 2

self_groupMethod · 0.95
UnaryExpressionClass · 0.85

Tested by

no test coverage detected