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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: