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

Function writeUpdate

packages/query-db-collection/src/manual-sync.ts:263–278  ·  view source on GitHub ↗
(data: Partial<TRow> | Array<Partial<TRow>>)

Source from the content-addressed store, hash-verified

261 },
262
263 writeUpdate(data: Partial<TRow> | Array<Partial<TRow>>) {
264 const operation: SyncOperation<TRow, TKey, TInsertInput> = {
265 type: `update`,
266 data,
267 }
268
269 const ctx = ensureContext()
270 const batchContext = activeBatchContexts.get(ctx)
271
272 if (batchContext?.isActive) {
273 batchContext.operations.push(operation)
274 return
275 }
276
277 performWriteOperations(operation, ctx)
278 },
279
280 writeDelete(key: TKey | Array<TKey>) {
281 const operation: SyncOperation<TRow, TKey, TInsertInput> = {

Callers

nothing calls this directly

Calls 3

ensureContextFunction · 0.85
performWriteOperationsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected