MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _implicit_coercions

Method _implicit_coercions

lib/sqlalchemy/sql/coercions.py:569–584  ·  view source on GitHub ↗
(self, element, resolved, argname=None, **kw)

Source from the content-addressed store, hash-verified

567 )
568
569 def _implicit_coercions(self, element, resolved, argname=None, **kw):
570 original_element = element
571 if not getattr(resolved, "is_clause_element", False):
572 self._raise_for_expected(original_element, argname, resolved)
573 elif resolved._is_select_base:
574 self._warn_for_scalar_subquery_coercion()
575 return resolved.scalar_subquery()
576 elif resolved._is_from_clause and isinstance(
577 resolved, selectable.Subquery
578 ):
579 self._warn_for_scalar_subquery_coercion()
580 return resolved.element.scalar_subquery()
581 elif self._role_class.allows_lambda and resolved._is_lambda_element:
582 return resolved
583 else:
584 self._raise_for_expected(original_element, argname, resolved)
585
586
587def _no_text_coercion(

Callers

nothing calls this directly

Calls 3

_raise_for_expectedMethod · 0.45
scalar_subqueryMethod · 0.45

Tested by

no test coverage detected