You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/model.js
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2522,7 +2522,7 @@ Model.$where = function $where() {
2522
2522
* @param {Boolean} [options.new=false] if true, return the modified document rather than the original
2523
2523
* @param {Object|String} [options.fields] Field selection. Equivalent to `.select(fields).findOneAndUpdate()`
2524
2524
* @param {Number} [options.maxTimeMS] puts a time limit on the query - requires mongodb >= 2.6.0
2525
-
* @param {Any} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update. TODO: Update type to proper type
2525
+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2526
2526
* @param {Boolean} [options.runValidators] if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema
2527
2527
* @param {Boolean} [options.setDefaultsOnInsert=true] If `setDefaultsOnInsert` and `upsert` are true, mongoose will apply the [defaults](https://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created
2528
2528
* @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)
@@ -2648,13 +2648,13 @@ function _decorateUpdateWithVersionKey(update, options, versionKey) {
2648
2648
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
2649
2649
* @param {Boolean} [options.timestamps=null] If set to `false` and [schema-level timestamps](/docs/guide.html#timestamps) are enabled, skip timestamps for this update. Note that this allows you to overwrite timestamps. Does nothing if schema-level timestamps are not set.
2650
2650
* @param {Boolean} [options.overwrite=false] By default, if you don't include any [update operators](https://docs.mongodb.com/manual/reference/operator/update/) in `update`, Mongoose will wrap `update` in `$set` for you. This prevents you from accidentally overwriting the document. This option tells Mongoose to skip adding `$set`. An alternative to this would be using [Model.findOneAndReplace({ _id: id }, update, options, callback)](https://mongoosejs.com/docs/api/model.html#model_Model.findOneAndReplace).
2651
-
* @param {Any} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update. TODO: Update type to proper type
2651
+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2652
2652
* @param {Boolean} [options.runValidators] if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema
2653
2653
* @param {Boolean} [options.setDefaultsOnInsert=true] If `setDefaultsOnInsert` and `upsert` are true, mongoose will apply the [defaults](https://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created
2654
2654
* @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)
2655
2655
* @param {Boolean} [options.upsert=false] if true, and no documents found, insert a new document
2656
2656
* @param {Boolean} [options.new=false] if true, return the modified document rather than the original
2657
-
* @param {Any} [options.select] sets the document fields to return. TODO: Update type to proper type
2657
+
* @param {Object|String} [options.select] sets the document fields to return.
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
2832
2832
* @param {Boolean} [options.timestamps=null] If set to `false` and [schema-level timestamps](/docs/guide.html#timestamps) are enabled, skip timestamps for this update. Note that this allows you to overwrite timestamps. Does nothing if schema-level timestamps are not set.
2833
2833
* @param {Object|String|String[]} [options.projection=null] optional fields to return, see [`Query.prototype.select()`](#query_Query-select)
2834
-
* @param {Any} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update. TODO: Update type to proper type
2834
+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2835
2835
* @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)
2836
-
* @param {Any} [options.select] sets the document fields to return. TODO: Update type to proper type
2836
+
* @param {Object|String} [options.select] sets the document fields to return.
2837
2837
* @param {Number} [options.maxTimeMS] puts a time limit on the query - requires mongodb >= 2.6.0
* @param {ClientSession} [options.session=null] The session associated with this query. See [transactions docs](/docs/transactions.html).
2912
2912
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
2913
2913
* @param {Object|String|String[]} [options.projection=null] optional fields to return, see [`Query.prototype.select()`](#query_Query-select)
2914
-
* @param {Any} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update. TODO: Update type to proper type
2914
+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2915
2915
* @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)
2916
-
* @param {Any} [options.select] sets the document fields to return. TODO: Update type to proper type
2916
+
* @param {Object|String} [options.select] sets the document fields to return.
2917
2917
* @param {Number} [options.maxTimeMS] puts a time limit on the query - requires mongodb >= 2.6.0
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
2975
2975
* @param {ClientSession} [options.session=null] The session associated with this query. See [transactions docs](/docs/transactions.html).
2976
2976
* @param {Object|String|String[]} [options.projection=null] optional fields to return, see [`Query.prototype.select()`](#query_Query-select)
2977
-
* @param {Any} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update. TODO: Update type to proper type
2977
+
* @param {Object|String} [options.sort] if multiple docs are found by the conditions, sets the sort order to choose which doc to update.
2978
2978
* @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)
2979
-
* @param {Any} [options.select] sets the document fields to return. TODO: Update type to proper type
2979
+
* @param {Object|String} [options.select] sets the document fields to return.
0 commit comments