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

Method reset

packages/db/src/query/subset-dedupe.ts:194–202  ·  view source on GitHub ↗

* Reset all tracking state. * Clears the history of loaded predicates and in-flight calls. * Use this when you want to start fresh, for example after clearing the underlying data store. * * Note: Any in-flight requests will still complete, but they will not update the tracking * state

()

Source from the content-addressed store, hash-verified

192 * state after the reset. This prevents old requests from repopulating cleared state.
193 */
194 reset(): void {
195 this.unlimitedWhere = undefined
196 this.hasLoadedAllData = false
197 this.limitedCalls = []
198 this.inflightCalls = []
199 // Increment generation to invalidate any in-flight completion handlers
200 // This ensures requests that were started before reset() don't repopulate the state
201 this.generation++
202 }
203
204 private updateTracking(options: LoadSubsetOptions): void {
205 // Update tracking based on whether this was a limited or unlimited call

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected