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

Method update

packages/db/src/collection/index.ts:755–766  ·  view source on GitHub ↗
(
    keys: (TKey | unknown) | Array<TKey | unknown>,
    configOrCallback:
      | ((draft: WritableDeep<TInput>) => void)
      | ((drafts: Array<WritableDeep<TInput>>) => void)
      | OperationConfig,
    maybeCallback?:
      | ((draft: WritableDeep<TInput>) => void)
      | ((drafts: Array<WritableDeep<TInput>>) => void),
  )

Source from the content-addressed store, hash-verified

753 ): TransactionType
754
755 update(
756 keys: (TKey | unknown) | Array<TKey | unknown>,
757 configOrCallback:
758 | ((draft: WritableDeep<TInput>) => void)
759 | ((drafts: Array<WritableDeep<TInput>>) => void)
760 | OperationConfig,
761 maybeCallback?:
762 | ((draft: WritableDeep<TInput>) => void)
763 | ((drafts: Array<WritableDeep<TInput>>) => void),
764 ) {
765 return this._mutations.update(keys, configOrCallback, maybeCallback)
766 }
767
768 /**
769 * Deletes one or more items from the collection

Callers 1

updateIndexesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected