MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _bind_param

Method _bind_param

lib/sqlalchemy/sql/elements.py:3552–3576  ·  view source on GitHub ↗
(self, operator, obj, type_=None, expanding=False)

Source from the content-addressed store, hash-verified

3550 return (self,)
3551
3552 def _bind_param(self, operator, obj, type_=None, expanding=False):
3553 if expanding:
3554 return BindParameter(
3555 None,
3556 value=obj,
3557 _compared_to_operator=operator,
3558 unique=True,
3559 expanding=True,
3560 type_=type_,
3561 _compared_to_type=self.type,
3562 )
3563 else:
3564 return Tuple(
3565 *[
3566 BindParameter(
3567 None,
3568 o,
3569 _compared_to_operator=operator,
3570 _compared_to_type=compared_to_type,
3571 unique=True,
3572 type_=type_,
3573 )
3574 for o, compared_to_type in zip(obj, self.type.types)
3575 ]
3576 )
3577
3578 def self_group(self, against: Optional[OperatorType] = None) -> Self:
3579 # Tuple is parenthesized by definition.

Callers 4

_literal_coercionMethod · 0.45
_literal_coercionMethod · 0.45
reverse_operateMethod · 0.45
reverse_operateMethod · 0.45

Calls 2

BindParameterClass · 0.85
TupleClass · 0.85

Tested by

no test coverage detected