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

Method constructor

packages/query-db-collection/src/query.ts:276–291  ·  view source on GitHub ↗
(
    state: QueryCollectionState,
    refetch: RefetchFn,
    writeUtils: ReturnType<typeof createWriteUtils>,
  )

Source from the content-addressed store, hash-verified

274 public writeBatch: any
275
276 constructor(
277 state: QueryCollectionState,
278 refetch: RefetchFn,
279 writeUtils: ReturnType<typeof createWriteUtils>,
280 ) {
281 this.state = state
282 this.refetchFn = refetch
283
284 // Initialize methods to use passed dependencies
285 this.refetch = refetch
286 this.writeInsert = writeUtils.writeInsert
287 this.writeUpdate = writeUtils.writeUpdate
288 this.writeDelete = writeUtils.writeDelete
289 this.writeUpsert = writeUtils.writeUpsert
290 this.writeBatch = writeUtils.writeBatch
291 }
292
293 public async clearError() {
294 this.state.lastError = undefined

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected