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

Method updateTracking

packages/db/src/query/subset-dedupe.ts:204–228  ·  view source on GitHub ↗
(options: LoadSubsetOptions)

Source from the content-addressed store, hash-verified

202 }
203
204 private updateTracking(options: LoadSubsetOptions): void {
205 // Update tracking based on whether this was a limited or unlimited call
206 if (options.limit === undefined) {
207 // Unlimited call - update combined where predicate
208 // We ignore orderBy for unlimited calls as mentioned in requirements
209 if (options.where === undefined) {
210 // No where clause = all data loaded
211 this.hasLoadedAllData = true
212 this.unlimitedWhere = undefined
213 this.limitedCalls = []
214 this.inflightCalls = []
215 } else if (this.unlimitedWhere === undefined) {
216 this.unlimitedWhere = options.where
217 } else {
218 this.unlimitedWhere = unionWherePredicates([
219 this.unlimitedWhere,
220 options.where,
221 ])
222 }
223 } else {
224 // Limited call - add to list for future subset checks
225 // Options are already cloned by caller to prevent mutation issues
226 this.limitedCalls.push(options)
227 }
228 }
229}
230
231/**

Callers 1

Calls 1

unionWherePredicatesFunction · 0.85

Tested by

no test coverage detected