• Type Parameters

    Parameters

    • collectionId: string

      The ID of the collection to save the item to.

    • item: CItem

      The item to insert or update.

    • Optionaloptions: WeivDataOptionsWriteOwner

      An object containing options to use when processing this operation.

    Returns Promise<SaveResult<CItem["_id"] extends string | ObjectId
        ? CItem
        : CItem & {
            _id: ItemID;
        }>>

    Fulfilled - The item that was either inserted or updated, depending on whether it previously existed in the collection. Rejected - The error that caused the rejection.

    Inserts or updates an item in a collection.