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

Method _negate

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

Source from the content-addressed store, hash-verified

3733 return self.element._from_objects
3734
3735 def _negate(self) -> ColumnElement[Any]:
3736 if self.type._type_affinity is type_api.BOOLEANTYPE._type_affinity:
3737 return UnaryExpression(
3738 self.self_group(against=operators.inv),
3739 operator=operators.inv,
3740 type_=type_api.BOOLEANTYPE,
3741 )
3742 else:
3743 return ColumnElement._negate(self)
3744
3745 def self_group(
3746 self, against: Optional[OperatorType] = None

Callers

nothing calls this directly

Calls 3

self_groupMethod · 0.95
UnaryExpressionClass · 0.85
_negateMethod · 0.45

Tested by

no test coverage detected