MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _py_wrapper_literal

Method _py_wrapper_literal

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

Source from the content-addressed store, hash-verified

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