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

Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.5.10
    • None
    • Querying
    • None
    • Fully Compatible
    • Query 2017-07-10, Query 2017-07-31

    Description

      Proposed Syntax

      $_internalSchemaMinItems will be a new MatchExpression. It accepts a nonnegative integer <size> and matches an array whose length is at least that number:

      { <field>: { $_internalSchemaMinItems: <size> } }
      

      $_internalSchemaMaxItems is similar, but matches arrays whose length is no larger than <size>.

      { <field>: { $_internalSchemaMaxItems: <size> } }
      

      This will allow us to implement the JSON Schema "minItems" and "maxItems" keywords.

      Attachments

        Activity

          People

            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: