MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _getitem_impl

Function _getitem_impl

lib/sqlalchemy/sql/default_comparator.py:229–242  ·  view source on GitHub ↗
(
    expr: ColumnElement[Any], op: OperatorType, other: Any, **kw: Any
)

Source from the content-addressed store, hash-verified

227
228
229def _getitem_impl(
230 expr: ColumnElement[Any], op: OperatorType, other: Any, **kw: Any
231) -> ColumnElement[Any]:
232 if (
233 isinstance(expr.type, type_api.INDEXABLE)
234 or isinstance(expr.type, type_api.TypeDecorator)
235 and isinstance(expr.type.impl_instance, type_api.INDEXABLE)
236 ):
237 other = coercions.expect(
238 roles.BinaryElementRole, other, expr=expr, operator=op
239 )
240 return _binary_operate(expr, op, other, **kw)
241 else:
242 _unsupported_impl(expr, op, other, **kw)
243
244
245def _unsupported_impl(

Callers

nothing calls this directly

Calls 2

_binary_operateFunction · 0.85
_unsupported_implFunction · 0.85

Tested by

no test coverage detected