MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _negate

Method _negate

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

Source from the content-addressed store, hash-verified

4018 return self.element._from_objects
4019
4020 def _negate(self) -> ColumnElement[Any]:
4021 if self.type._type_affinity is type_api.BOOLEANTYPE._type_affinity:
4022 return UnaryExpression(
4023 self.self_group(against=operators.inv),
4024 operator=operators.inv,
4025 type_=type_api.BOOLEANTYPE,
4026 )
4027 else:
4028 return ColumnElement._negate(self)
4029
4030 def self_group(
4031 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