MCPcopy Create free account
hub / github.com/TanStack/db / restore

Function restore

packages/db/tests/utils.ts:140–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 const restore = () => {
141 // Restore original index methods
142 for (const [indexId, index] of collection.indexes) {
143 const original = originalMethods.get(indexId)
144 if (original) {
145 index.lookup = original.lookup
146 if (original.rangeQuery) {
147 index.rangeQuery = original.rangeQuery
148 }
149 }
150 }
151 collection.entries = originalEntries
152 }
153
154 return { stats, restore }
155}

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected