Skip to content

Commit

Permalink
Merge pull request #9527 from ksullivan/patch-1
Browse files Browse the repository at this point in the history
Remove redundant code.
  • Loading branch information
vkarpov15 authored Nov 8, 2020
2 parents 8b0e869 + 0ffcf3b commit 61af2af
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -1687,39 +1687,6 @@ Query.prototype.lean = function(v) {
return this;
};

/**
* Returns an object containing the Mongoose-specific options for this query,
* including `lean` and `populate`.
*
* Mongoose-specific options are different from normal options (`sort`, `limit`, etc.)
* because they are **not** sent to the MongoDB server.
*
* ####Example:
*
* const q = new Query();
* q.mongooseOptions().lean; // undefined
*
* q.lean();
* q.mongooseOptions().lean; // true
*
* This function is useful for writing [query middleware](/docs/middleware.html).
* Below is a full list of properties the return value from this function may have:
*
* - `populate`
* - `lean`
* - `omitUndefined`
* - `strict`
* - `nearSphere`
* - `useFindAndModify`
*
* @return {Object} Mongoose-specific options
* @param public
*/

Query.prototype.mongooseOptions = function() {
return this._mongooseOptions;
};

/**
* Adds a `$set` to this query's update without changing the operation.
* This is useful for query middleware so you can add an update regardless
Expand Down

0 comments on commit 61af2af

Please sign in to comment.