MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / extract_first_column_annotation

Function extract_first_column_annotation

lib/sqlalchemy/sql/util.py:511–523  ·  view source on GitHub ↗
(column, annotation_name)

Source from the content-addressed store, hash-verified

509
510
511def extract_first_column_annotation(column, annotation_name):
512 filter_ = (FromGrouping, SelectBase)
513
514 stack = deque([column])
515 while stack:
516 elem = stack.popleft()
517 if annotation_name in elem._annotations:
518 return elem._annotations[annotation_name]
519 for sub in elem.get_children():
520 if isinstance(sub, filter_):
521 continue
522 stack.append(sub)
523 return None
524
525
526def selectables_overlap(left: FromClause, right: FromClause) -> bool:

Callers

nothing calls this directly

Calls 2

get_childrenMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected