stockshark-data-access
Advanced tools
Comparing version 1.0.46 to 1.0.47
{ | ||
"name": "stockshark-data-access", | ||
"version": "1.0.46", | ||
"version": "1.0.47", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -101,4 +101,3 @@ const MongoClient = require('mongodb').MongoClient; | ||
} | ||
const result = await coll.distinct(field, filter) | ||
return result | ||
return await coll.distinct(field, filter) | ||
} | ||
@@ -108,3 +107,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.insertOne(data) | ||
return await coll.insertOne(data) | ||
} | ||
@@ -114,3 +113,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.insertMany(data, { ordered: false }) | ||
return await coll.insertMany(data, { ordered: false }) | ||
} | ||
@@ -126,3 +125,3 @@ | ||
} | ||
await Promise.all(tasks) | ||
return await Promise.all(tasks) | ||
} | ||
@@ -132,3 +131,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.updateOne({ _id: id }, update, { upsert: false }) | ||
return await coll.updateOne({ _id: id }, update, { upsert: false }) | ||
} | ||
@@ -143,3 +142,3 @@ | ||
await coll.updateMany(filter, update, { multi: true, upsert: false }) | ||
return await coll.updateMany(filter, update, { multi: true, upsert: false }) | ||
} | ||
@@ -149,3 +148,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.updateOne({ _id: id }, { $set: change }, { upsert: false }) | ||
return await coll.updateOne({ _id: id }, { $set: change }, { upsert: false }) | ||
} | ||
@@ -160,3 +159,3 @@ | ||
await coll.updateMany(filter, { $set: change }, { multi: true, upsert: false }) | ||
return await coll.updateMany(filter, { $set: change }, { multi: true, upsert: false }) | ||
} | ||
@@ -169,3 +168,3 @@ | ||
// await coll.updateOne({ _id: _id }, { $set: updateData }, { upsert: true }) | ||
await coll.updateOne({ _id: id }, { $set: data }, { upsert: true }) | ||
return await coll.updateOne({ _id: id }, { $set: data }, { upsert: true }) | ||
} | ||
@@ -175,3 +174,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.deleteOne({ _id }) | ||
return await coll.deleteOne({ _id }) | ||
} | ||
@@ -181,3 +180,3 @@ | ||
const coll = this.db.collection(collection); | ||
await coll.deleteMany(filter) | ||
return await coll.deleteMany(filter) | ||
} | ||
@@ -184,0 +183,0 @@ |
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
17659
307