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

Method operate

lib/sqlalchemy/sql/elements.py:3835–3843  ·  view source on GitHub ↗
(
        self, op: OperatorType, *other: Any, **kwargs: Any
    )

Source from the content-addressed store, hash-verified

3833 # dispatch onto the type comparator directly, so that we can
3834 # ensure "reversed" behavior.
3835 def operate(
3836 self, op: OperatorType, *other: Any, **kwargs: Any
3837 ) -> ColumnElement[_T]:
3838 if not operators.is_comparison(op):
3839 raise exc.ArgumentError(
3840 "Only comparison operators may be used with ANY/ALL"
3841 )
3842 kwargs["reverse"] = True
3843 return self.comparator.operate(operators.mirror(op), *other, **kwargs)
3844
3845 def reverse_operate(
3846 self, op: OperatorType, other: Any, **kwargs: Any

Callers

nothing calls this directly

Calls 2

is_comparisonMethod · 0.80
operateMethod · 0.45

Tested by

no test coverage detected