MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _literal_coercion

Method _literal_coercion

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

Source from the content-addressed store, hash-verified

606 __slots__ = ()
607
608 def _literal_coercion(self, element, *, argname=None, **kw):
609 if isinstance(element, str) and issubclass(
610 elements.TextClause, self._role_class
611 ):
612 _no_text_coercion(element, argname)
613 else:
614 self._raise_for_expected(element, argname)
615
616
617class _CoerceLiterals(RoleImpl):

Callers

nothing calls this directly

Calls 2

_no_text_coercionFunction · 0.85
_raise_for_expectedMethod · 0.45

Tested by

no test coverage detected