MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _annotate_columns

Function _annotate_columns

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

Source from the content-addressed store, hash-verified

2333
2334
2335def _annotate_columns(element: _CE, annotations: _AnnotationDict) -> _CE:
2336 def clone(elem: _CE) -> _CE:
2337 if isinstance(elem, expression.ColumnClause):
2338 elem = elem._annotate(annotations.copy()) # type: ignore
2339 elem._copy_internals(clone=clone)
2340 return elem
2341
2342 if element is not None:
2343 element = clone(element)
2344 clone = None # type: ignore # remove gc cycles
2345 return element
2346
2347
2348class _JoinCondition:

Callers 2

remoteFunction · 0.85
foreignFunction · 0.85

Calls 1

cloneFunction · 0.70

Tested by

no test coverage detected