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

Add arrayFilters parameter to update and findAndModify shell helpers

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.6
    • Affects Version/s: None
    • Component/s: Querying, Shell
    • None
    • Fully Compatible
    • v3.4
    • Query 2017-04-17

      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();
      

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

              Created:
              Updated:
              Resolved: