MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __setstate__

Method __setstate__

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

Source from the content-addressed store, hash-verified

2119 }
2120
2121 def __setstate__(self, state: Dict[str, Any]) -> None:
2122 object.__setattr__(self, "_index", state["_index"])
2123 object.__setattr__(
2124 self, "_proxy_index", collections.defaultdict(util.OrderedSet)
2125 )
2126 object.__setattr__(
2127 self,
2128 "_collection",
2129 [
2130 (k, c, _ColumnMetrics(self, c))
2131 for (k, c) in state["_collection"]
2132 ],
2133 )
2134 object.__setattr__(
2135 self, "_colset", {col for k, col, _ in self._collection}
2136 )
2137
2138 def add(
2139 self,

Callers

nothing calls this directly

Calls 2

_ColumnMetricsClass · 0.85
__setattr__Method · 0.45

Tested by

no test coverage detected