senter-mongo-repository
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -131,3 +131,3 @@ const MongoClient = require('mongodb').MongoClient; | ||
let response = await this._collection.insertOne(document); | ||
let response = await this._collection.insertOne(document, {w:1}); | ||
@@ -173,3 +173,3 @@ // if (response.insertedCount !== 1) { | ||
let response = await this._collection.insertMany(documents); | ||
let response = await this._collection.insertMany(documents, {w:"majority"}); | ||
@@ -218,3 +218,3 @@ documents.forEach(document => { | ||
const response = await this._collection.updateMany(filter, update); | ||
const response = await this._collection.updateMany(filter, update, {w:"majority"}); | ||
@@ -252,3 +252,3 @@ // if (response.modifiedCount !== 1) { | ||
} | ||
}); | ||
}, {w:1}); | ||
@@ -286,3 +286,3 @@ // if (response.modifiedCount !== 1) { | ||
} | ||
}); | ||
}, {w: "majority"}); | ||
@@ -313,3 +313,3 @@ // if (response.modifiedCount !== 1) { | ||
userId: userId | ||
}); | ||
}, {w:1}); | ||
@@ -372,3 +372,3 @@ // if (response.deletedCount !== 1) { | ||
upsert: upsert === true | ||
}); | ||
}, {w:1}); | ||
@@ -375,0 +375,0 @@ // if (response.modifiedCount !== 1) { |
{ | ||
"name": "senter-mongo-repository", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Contain methods to work with mongo db", | ||
@@ -5,0 +5,0 @@ "main": "mongoReposotory.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31989