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

Investigate changes in SERVER-44327: Add $first and $last expressions

    XMLWordPrintableJSON

Details

    Description

      Description

      Downstream Change Summary

      Adds the $first and $last expressions.

      Description of Linked Ticket

      The query team has decided on the following semantics and syntax:

      Name: $first/last

      Evaluates to the value at the first (or last) position in the passed in array. Errors if the passed in value is not an array and not nullish. Evaluates to missing if the array is empty, which is consistent with $arrayElemAt's behavior. Evaluates to null if input is nullish.

      Syntax:

      { $first: <Expression> }
      

      Scope of changes

      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)
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

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