Skip to content

Commit

Permalink
style(query): add examples of "array of array key-value pairs" for "q…
Browse files Browse the repository at this point in the history
…uery.sort"
  • Loading branch information
hasezoey committed Sep 29, 2022
1 parent e00a43a commit 0a1baf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/query.js
Expand Up @@ -2951,11 +2951,14 @@ Query.prototype.distinct = function(field, conditions, callback) {
* // equivalent
* query.sort('field -test');
*
* // also possible is to use a array with array key-value pairs
* query.sort([["field", "asc"]]);
*
* #### Note:
*
* Cannot be used with `distinct()`
*
* @param {Object|String} arg
* @param {Object|String|Array.<Array<(string | number)>>} arg
* @return {Query} this
* @see cursor.sort https://docs.mongodb.org/manual/reference/method/cursor.sort/
* @api public
Expand Down

0 comments on commit 0a1baf5

Please sign in to comment.