Skip to content

Use mongo $position modifier when adding entries to a response #294

@prashtx

Description

@prashtx

I believe we currently use $slice and $push to add a new entry to the beginning of a response's entries array. After upgrading to MongoDB 3.0, we can use the $position modifier to directly place the new entry at the beginning rather than end of the array.

http://docs.mongodb.org/manual/reference/operator/update/position/#up._S_position

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions