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

Function wrappedOnUpdate

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

Source from the content-addressed store, hash-verified

2685 }
2686
2687 const wrappedOnUpdate = async (
2688 params: UpdateMutationFnParams<T, TKey, TUtils & PersistedCollectionUtils>,
2689 ) => {
2690 const handlerResult = localOnlyOptions.onUpdate
2691 ? await localOnlyOptions.onUpdate(
2692 params as unknown as UpdateMutationFnParams<T, TKey, TUtils>,
2693 )
2694 : undefined
2695
2696 await runtime.persistAndConfirmCollectionMutations(
2697 params.transaction.mutations as Array<PendingMutation<T>>,
2698 )
2699
2700 return handlerResult ?? {}
2701 }
2702
2703 const wrappedOnDelete = async (
2704 params: DeleteMutationFnParams<T, TKey, TUtils & PersistedCollectionUtils>,

Callers

nothing calls this directly

Tested by

no test coverage detected