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

Function writeDelete

packages/query-db-collection/src/manual-sync.ts:280–295  ·  view source on GitHub ↗
(key: TKey | Array<TKey>)

Source from the content-addressed store, hash-verified

278 },
279
280 writeDelete(key: TKey | Array<TKey>) {
281 const operation: SyncOperation<TRow, TKey, TInsertInput> = {
282 type: `delete`,
283 key,
284 }
285
286 const ctx = ensureContext()
287 const batchContext = activeBatchContexts.get(ctx)
288
289 if (batchContext?.isActive) {
290 batchContext.operations.push(operation)
291 return
292 }
293
294 performWriteOperations(operation, ctx)
295 },
296
297 writeUpsert(data: Partial<TRow> | Array<Partial<TRow>>) {
298 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