Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

API cursor_methods

Michael Comella edited this page May 12, 2013 · 6 revisions

The cursor_methods object enumerates the methods that will be applied to the cursor before the query's result set is returned. The keys of this object are method names from mongo's JavaScript cursor API and the associated values are objects representing the arguments to those functions. The keys of this argument object are parameter names and the values are the parameters' values. Note that methods for missing keys will not be called.

sort

cursor.sort(sort) - Control the order that the query returns matching documents.

  • sort - A document whose fields specify the attributes on which to sort the result set.

Example

{
  sort: {
    sort: {iu: -1}
  }
}

TODO

  • This is currently unimplemented on both server and client - it can be easily changed.
Clone this wiki locally