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

Method _py_wrapper_literal

lib/sqlalchemy/sql/lambdas.py:1363–1376  ·  view source on GitHub ↗
(self, expr=None, operator=None, **kw)

Source from the content-addressed store, hash-verified

1361 pywrapper._sa__extract_bound_parameters(element, result_list)
1362
1363 def _py_wrapper_literal(self, expr=None, operator=None, **kw):
1364 param = object.__getattribute__(self, "_param")
1365 to_evaluate = object.__getattribute__(self, "_to_evaluate")
1366 if param is None:
1367 name = object.__getattribute__(self, "_name")
1368 self._param = param = elements.BindParameter(
1369 name,
1370 required=False,
1371 unique=True,
1372 _compared_to_operator=operator,
1373 _compared_to_type=expr.type if expr is not None else None,
1374 )
1375 self._has_param = True
1376 return param._with_value(to_evaluate, maintain_key=True)
1377
1378 def __bool__(self):
1379 to_evaluate = object.__getattribute__(self, "_to_evaluate")

Callers

nothing calls this directly

Calls 2

_with_valueMethod · 0.95
__getattribute__Method · 0.45

Tested by

no test coverage detected