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

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: