MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _is_literal

Function _is_literal

lib/sqlalchemy/sql/coercions.py:80–89  ·  view source on GitHub ↗

Return whether or not the element is a "literal" in the context of a SQL expression construct.

(element: Any)

Source from the content-addressed store, hash-verified

78
79
80def _is_literal(element: Any) -> bool:
81 """Return whether or not the element is a "literal" in the context
82 of a SQL expression construct.
83
84 """
85
86 return not isinstance(
87 element,
88 (Visitable, schema.SchemaEventTarget),
89 ) and not hasattr(element, "__clause_element__")
90
91
92def _deep_is_literal(element):

Callers 2

_implicit_coercionsMethod · 0.85
_literal_coercionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected