robbiblubber.org

help | login | search:  
<<

Home Page
Index

Projects

Utility Suite
Data Suite
Bad Wolf Suite
WeakWiki

User Docs

ConfigNotepad
LED
rqoon
Nuub

Code Docs

.NET
Java
PHP

robbiblubber.org

Specs
Articles

Sources















show wiki  show source  compare to current  compare to previous  read  history 


sort()


MongoDB Driver Function Reference


Sorts the results.
More information can be found in the corresponding entry of the MongoDB Manual.



<cursor>.sort(<sort>)



Arguments


<cursor> The target cursor.
<sort> A BSON document containing the sort fields.



Example


db.employees.find().sort({ age: 1, salary: -1 });


Orders all employees ascending by age, then descending by salary.














home | MongoDB Driver Function Reference | MongoDB Driver