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

Class ColumnSet

lib/sqlalchemy/sql/base.py:2231–2248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2229
2230
2231class ColumnSet(util.OrderedSet["ColumnClause[Any]"]):
2232 def contains_column(self, col: ColumnClause[Any]) -> bool:
2233 return col in self
2234
2235 def extend(self, cols: Iterable[Any]) -> None:
2236 for col in cols:
2237 self.add(col)
2238
2239 def __eq__(self, other):
2240 l = []
2241 for c in other:
2242 for local in self:
2243 if c.shares_lineage(local):
2244 l.append(c == local)
2245 return elements.and_(*l)
2246
2247 def __hash__(self) -> int: # type: ignore[override]
2248 return hash(tuple(x for x in self))
2249
2250
2251def _entity_namespace(

Callers 2

_setup_collectionsMethod · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected