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

Function _annotate_columns

lib/sqlalchemy/orm/relationships.py:2254–2264  ·  view source on GitHub ↗
(element: _CE, annotations: _AnnotationDict)

Source from the content-addressed store, hash-verified

2252
2253
2254def _annotate_columns(element: _CE, annotations: _AnnotationDict) -> _CE:
2255 def clone(elem: _CE) -> _CE:
2256 if isinstance(elem, expression.ColumnClause):
2257 elem = elem._annotate(annotations.copy()) # type: ignore
2258 elem._copy_internals(clone=clone)
2259 return elem
2260
2261 if element is not None:
2262 element = clone(element)
2263 clone = None # type: ignore # remove gc cycles
2264 return element
2265
2266
2267class JoinCondition:

Callers 2

remoteFunction · 0.85
foreignFunction · 0.85

Calls 1

cloneFunction · 0.70

Tested by

no test coverage detected