WeivData API Reference | ExWeiv Apps
    Preparing search index...

    Function replace

    • Type Parameters

      Parameters

      • collectionId: string

        The ID of the collection that contains the item to replace.

      • item: CItem

        The item to replace.

      • Optionaloptions: WeivDataOptionsOwner

        An object containing options to use when processing this operation.

      Returns Promise<CItem>

      Fulfilled - The item that was replaced. Rejected - The error that caused the rejection.

      Replaces and item in a collection. The item you passed with item param will take the place of existing data/document in your collection.

      This function has it's own hooks beforeUpdate and afterUpdate is not used here instead beforeReplace and afterReplace is used.