-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Write Ops
-
None
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.
- duplicates
-
SERVER-2363 $push/$pushAll support for insertion at any position (top/bottom/ordinal)
- Closed
- is related to
-
SERVER-6399 Refactor update() code
- Closed