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

Capped Arrays / Limited Stacks - The ability to define a max number of elements in an array

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      It would be nice to have the ability in one statement to be able to cap the elements in an array to keep a fixed stack size.

      e.g. If I want to store the latest 10 users who have visited a blog post in an array within a document. Currently this requires two operations

      Redis supports things like this with Lists and lpush, ltrim, etc..., it would be handy in mongodb as well.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            jiminoc Jim Plush
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: