Add the ability to specify a pipeline to the findAndModify command

XMLWordPrintableJSON

    • Fully Compatible
    • Query 2019-04-08, Query 2019-04-22, Query 2019-05-06
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The new syntax will look like this:

      {
        findAndModify: <collection-name>,
        query: <document>,
        sort: <document>,
        remove: <boolean>,
        update: <document OR pipeline>,
        new: <boolean>,
        fields: <document>,
        upsert: <boolean>,
        bypassDocumentValidation: <boolean>,
        writeConcern: <document>,
        collation: <document>,
        arrayFilters: <array>
      }
      

      The only supported stages in a pipeline will be single-document transformations: $addFields, $project, and $replaceRoot. For this ticket, we will not support options such as collation, bypassDocumentValidation, upsert, sort, and fields. Those options will be tracked by separate work items. We will never support arrayFilters in the pipeline-style update.

              Assignee:
              Charlie Swanson
              Reporter:
              Charlie Swanson
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: