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

Add arrayFilters parameter to update and findAndModify shell helpers

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.6
    • Component/s: Querying, Shell
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Epic Link:
    • Sprint:
      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

            Assignee:
            tess.avitabile Tess Avitabile
            Reporter:
            tess.avitabile Tess Avitabile
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: