MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _custom_op_operate

Function _custom_op_operate

lib/sqlalchemy/sql/default_comparator.py:144–160  ·  view source on GitHub ↗
(
    expr: ColumnElement[Any],
    op: custom_op[Any],
    obj: Any,
    reverse: bool = False,
    result_type: Optional[TypeEngine[Any]] = None,
    **kw: Any,
)

Source from the content-addressed store, hash-verified

142
143
144def _custom_op_operate(
145 expr: ColumnElement[Any],
146 op: custom_op[Any],
147 obj: Any,
148 reverse: bool = False,
149 result_type: Optional[TypeEngine[Any]] = None,
150 **kw: Any,
151) -> ColumnElement[Any]:
152 if result_type is None:
153 if op.return_type:
154 result_type = op.return_type
155 elif op.is_comparison:
156 result_type = type_api.BOOLEANTYPE
157
158 return _binary_operate(
159 expr, op, obj, reverse=reverse, result_type=result_type, **kw
160 )
161
162
163def _binary_operate(

Callers

nothing calls this directly

Calls 1

_binary_operateFunction · 0.85

Tested by

no test coverage detected