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

Add the ability to specify a pipeline to an update command

    • Fully Compatible
    • Query 2019-04-08, Query 2019-04-22

      Extend the update command to take an object or an array:

      {
         update: <collection>,
         updates: [
            { q: <query>, u: <update obj OR update pipeline>, upsert: <boolean>,
              multi: <boolean>, collation: <document>, arrayFilters: <array> },
            { q: <query>, u: <update obj OR update pipeline>, upsert: <boolean>,
              multi: <boolean>, collation: <document>, arrayFilters: <array> },
            ...
         ],
         ordered: <boolean>,
         writeConcern: { <write concern> },
         bypassDocumentValidation: <boolean>
      }
      

      For this task, the only supported stages will be $addFields, $project, and $replaceRoot.

      For this task, we should ban other options such as 'collation', 'bypassDocumentValidation', 'writeConcern', 'arrayFilters'. All except 'arrayFilters' will eventually be supported, but will be tracked by separate tickets.

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: