mingo
    Preparing search index...

    Function updateMany

    • Updates all documents that match the specified filter for a collection.

      Supports both aggregation pipeline updates and standard update operators. Documents in the collection may be replaced or modified.

      Parameters

      • documents: AnyObject[]

        The array of documents to update.

      • condition: AnyObject

        The selection criteria for the update.

      • modifier: Modifier | PipelineStage[]

        The modifications to apply.

      • updateConfig: UpdateConfig = {}

        Optional update config parameters.

      • Optionaloptions: Partial<Options>

        Optional settings to control update behavior.

      Returns { matchedCount: number; modifiedCount: number }