Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12671

Docs for SERVER-40397: Add the ability to specify a pipeline to the findAndModify command

    XMLWordPrintableJSON

Details

    Description

      Description

      Description:

      Adds the ability to specify a pipeline to the findAndModify update parameter.

      Engineering Ticket Description:

      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.

      *note* : per DOCS-12724 – it is available with*OUT* feature flag.

      Scope of changes

      • findAndModify command and helper
      • findOneAndUpdate helper

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 36 weeks, 1 day ago