Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28576

Add arrayFilters parameter to update and findAndModify shell helpers

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.6
    • Querying, Shell
    • None
    • Fully Compatible
    • v3.4
    • Query 2017-04-17

    Description

      Operations:

      db.coll.findAndModify({<update>: ..., arrayFilters: [...]);
      db.coll.update(<predicate>, <mods>, {arrayFilters: [...]});
      

      CRUD API:

      db.coll.bulkWrite([
          {updateOne: {..., arrayFilters: [...]}},
          {updateMany: {..., arrayFilters: [...]}},
      ]);
      db.coll.findOneAndUpdate(
      <filter>, <update>, {arrayFilters: [...]}
      );
      db.coll.updateOne(<filter>, <update>, {arrayFilters: [...]});
      db.coll.updateMany(<filter>, <update>, {arrayFilters: [...]});
      

      Bulk write API:

      var bulk = db.coll.initializeUnorderedBulkOp();
      bulk.find({...}).arrayFilters([...]).updateOne/update();
      bulk.execute();
      

      Attachments

        Activity

          People

            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: