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

Method __setstate__

lib/sqlalchemy/sql/base.py:1856–1871  ·  view source on GitHub ↗
(self, state: Dict[str, Any])

Source from the content-addressed store, hash-verified

1854 }
1855
1856 def __setstate__(self, state: Dict[str, Any]) -> None:
1857 object.__setattr__(self, "_index", state["_index"])
1858 object.__setattr__(
1859 self, "_proxy_index", collections.defaultdict(util.OrderedSet)
1860 )
1861 object.__setattr__(
1862 self,
1863 "_collection",
1864 [
1865 (k, c, _ColumnMetrics(self, c))
1866 for (k, c) in state["_collection"]
1867 ],
1868 )
1869 object.__setattr__(
1870 self, "_colset", {col for k, col, _ in self._collection}
1871 )
1872
1873 def contains_column(self, col: ColumnElement[Any]) -> bool:
1874 """Checks if a column object exists in this collection"""

Callers

nothing calls this directly

Calls 2

_ColumnMetricsClass · 0.85
__setattr__Method · 0.45

Tested by

no test coverage detected