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

Function wrappedOnDelete

packages/db-sqlite-persistence-core/src/persisted.ts:2703–2717  ·  view source on GitHub ↗
(
    params: DeleteMutationFnParams<T, TKey, TUtils & PersistedCollectionUtils>,
  )

Source from the content-addressed store, hash-verified

2701 }
2702
2703 const wrappedOnDelete = async (
2704 params: DeleteMutationFnParams<T, TKey, TUtils & PersistedCollectionUtils>,
2705 ) => {
2706 const handlerResult = localOnlyOptions.onDelete
2707 ? await localOnlyOptions.onDelete(
2708 params as unknown as DeleteMutationFnParams<T, TKey, TUtils>,
2709 )
2710 : undefined
2711
2712 await runtime.persistAndConfirmCollectionMutations(
2713 params.transaction.mutations as Array<PendingMutation<T>>,
2714 )
2715
2716 return handlerResult ?? {}
2717 }
2718
2719 const acceptMutations = async (transaction: {
2720 mutations: Array<PendingMutation<Record<string, unknown>>>

Callers

nothing calls this directly

Tested by

no test coverage detected