MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / ColumnSet

Class ColumnSet

lib/sqlalchemy/sql/base.py:2567–2584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2565
2566
2567class ColumnSet(util.OrderedSet["ColumnClause[Any]"]):
2568 def contains_column(self, col: ColumnClause[Any]) -> bool:
2569 return col in self
2570
2571 def extend(self, cols: Iterable[Any]) -> None:
2572 for col in cols:
2573 self.add(col)
2574
2575 def __eq__(self, other):
2576 l = []
2577 for c in other:
2578 for local in self:
2579 if c.shares_lineage(local):
2580 l.append(c == local)
2581 return elements.and_(*l)
2582
2583 def __hash__(self) -> int: # type: ignore[override]
2584 return hash(tuple(x for x in self))
2585
2586
2587def _entity_namespace(

Callers 2

_setup_collectionsMethod · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected