Skip to content

Commit

Permalink
feat(db): deprecate createCollection strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
emadum authored Aug 12, 2020
1 parent 3cda5c4 commit 4cc6bcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Db.prototype.collection = function(name, options, callback) {
* @param {object} [options.pkFactory] A primary key factory object for generation of custom _id keys.
* @param {(ReadPreference|string)} [options.readPreference] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
* @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
* @param {boolean} [options.strict=false] Returns an error if the collection does not exist
* @param {boolean} [options.strict=false] DEPRECATED: Returns an error if the collection does not exist
* @param {boolean} [options.capped=false] Create a capped collection.
* @param {boolean} [options.autoIndexId=true] DEPRECATED: Create an index on the _id field of the document, True by default on MongoDB 2.6 - 3.0
* @param {number} [options.size] The size of the capped collection in bytes.
Expand All @@ -513,7 +513,7 @@ Db.prototype.collection = function(name, options, callback) {
Db.prototype.createCollection = deprecateOptions(
{
name: 'Db.createCollection',
deprecatedOptions: ['autoIndexId'],
deprecatedOptions: ['autoIndexId', 'strict'],
optionsIndex: 1
},
function(name, options, callback) {
Expand Down

0 comments on commit 4cc6bcc

Please sign in to comment.