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

Method _bind_param

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

Source from the content-addressed store, hash-verified

3267 return (self,)
3268
3269 def _bind_param(self, operator, obj, type_=None, expanding=False):
3270 if expanding:
3271 return BindParameter(
3272 None,
3273 value=obj,
3274 _compared_to_operator=operator,
3275 unique=True,
3276 expanding=True,
3277 type_=type_,
3278 _compared_to_type=self.type,
3279 )
3280 else:
3281 return Tuple(
3282 *[
3283 BindParameter(
3284 None,
3285 o,
3286 _compared_to_operator=operator,
3287 _compared_to_type=compared_to_type,
3288 unique=True,
3289 type_=type_,
3290 )
3291 for o, compared_to_type in zip(obj, self.type.types)
3292 ]
3293 )
3294
3295 def self_group(self, against: Optional[OperatorType] = None) -> Self:
3296 # 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