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

Method shares_lineage

lib/sqlalchemy/sql/elements.py:1605–1609  ·  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

1603 )
1604
1605 def shares_lineage(self, othercolumn: ColumnElement[Any]) -> bool:
1606 """Return True if the given :class:`_expression.ColumnElement`
1607 has a common ancestor to this :class:`_expression.ColumnElement`."""
1608
1609 return bool(self.proxy_set.intersection(othercolumn.proxy_set))
1610
1611 def _compare_name_for_result(self, other: ColumnElement[Any]) -> bool:
1612 """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