Skip to content

Commit 9c129c0

Browse files
committed
style(model): move option description to jsdoc tags for "Model.findOneAndDelete"
1 parent 48e9ebc commit 9c129c0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lib/model.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,15 +2703,6 @@ Model.findByIdAndUpdate = function(id, update, options, callback) {
27032703
* this distinction is purely pedantic. You should use `findOneAndDelete()`
27042704
* unless you have a good reason not to.
27052705
*
2706-
* #### Options:
2707-
*
2708-
* - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
2709-
* - `maxTimeMS`: puts a time limit on the query - requires mongodb >= 2.6.0
2710-
* - `select`: sets the document fields to return, ex. `{ projection: { _id: 0 } }`
2711-
* - `projection`: equivalent to `select`
2712-
* - `rawResult`: if true, returns the [raw result from the MongoDB driver](https://mongodb.github.io/node-mongodb-native/4.3/interfaces/ModifyResult.html)
2713-
* - `strict`: overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict) for this update
2714-
*
27152706
* #### Examples:
27162707
*
27172708
* A.findOneAndDelete(conditions, options, callback) // executes
@@ -2735,6 +2726,10 @@ Model.findByIdAndUpdate = function(id, update, options, callback) {
27352726
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
27362727
* @param {Object|String|String[]} [options.projection=null] optional fields to return, see [`Query.prototype.select()`](#query_Query-select)
27372728
* @param {ClientSession} [options.session=null] The session associated with this query. See [transactions docs](/docs/transactions.html).
2729+
* @param {Boolean} [options.rawResult] if true, returns the [raw result from the MongoDB driver](https://mongodb.github.io/node-mongodb-native/4.3/interfaces/ModifyResult.html)
2730+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2731+
* @param {Object|String} [options.select] sets the document fields to return.
2732+
* @param {Number} [options.maxTimeMS] puts a time limit on the query - requires mongodb >= 2.6.0
27382733
* @param {Function} [callback]
27392734
* @return {Query}
27402735
* @api public

0 commit comments

Comments
 (0)