|
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.
|