MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / shares_lineage

Method shares_lineage

lib/sqlalchemy/sql/elements.py:1667–1671  ·  view source on GitHub ↗

Return True if the given :class:`_expression.ColumnElement` has a common ancestor to this :class:`_expression.ColumnElement`.

(self, othercolumn: ColumnElement[Any])

Source from the content-addressed store, hash-verified

1665 )
1666
1667 def shares_lineage(self, othercolumn: ColumnElement[Any]) -> bool:
1668 """Return True if the given :class:`_expression.ColumnElement`
1669 has a common ancestor to this :class:`_expression.ColumnElement`."""
1670
1671 return bool(self.proxy_set.intersection(othercolumn.proxy_set))
1672
1673 def _compare_name_for_result(self, other: ColumnElement[Any]) -> bool:
1674 """Return True if the given column element compares to this one

Callers 12

corresponding_columnMethod · 0.80
__eq__Method · 0.80
visit_label_referenceMethod · 0.80
reduce_columnsFunction · 0.80
visit_binaryFunction · 0.80
visit_binaryMethod · 0.80
visit_binaryMethod · 0.80
execute_chooserFunction · 0.80
execute_chooserFunction · 0.80
execute_chooserFunction · 0.80

Calls 1

intersectionMethod · 0.45

Tested by 2

visit_binaryMethod · 0.64
visit_binaryMethod · 0.64