Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None

      Description

      Currently $push() only pushes items onto the end of the array.
      It would be nice if we could pass an optional boolean parameter that would allow pushing to the front of the array instead.

      This would allow reversing the order of arrays by nature of the front-push update, and would eliminate the need to do any client side sorting or reversing.
      Currently adding array items atomically in reverse chronological order is not possible.

      This is similar to SERVER-2036, and having an $insert() would accomplish the same thing.
      But more specific and easier.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: