MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / operate

Method operate

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

Source from the content-addressed store, hash-verified

4118 # dispatch onto the type comparator directly, so that we can
4119 # ensure "reversed" behavior.
4120 def operate(
4121 self, op: OperatorType, *other: Any, **kwargs: Any
4122 ) -> ColumnElement[_T]:
4123 if not operators.is_comparison(op):
4124 raise exc.ArgumentError(
4125 "Only comparison operators may be used with ANY/ALL"
4126 )
4127 kwargs["reverse"] = True
4128 return self.comparator.operate(operators.mirror(op), *other, **kwargs)
4129
4130 def reverse_operate(
4131 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