Remove usages of non-adaptive collection inside DatabaseController.

This commit is contained in:
Nikita Lutsenko
2016-03-07 19:26:40 -08:00
parent 8d10447c9f
commit a163327ac9
3 changed files with 74 additions and 68 deletions

View File

@@ -57,6 +57,10 @@ export default class MongoCollection {
})
}
insertOne(object) {
return this._mongoCollection.insertOne(object);
}
// Atomically updates data in the database for a single (first) object that matched the query
// If there is nothing that matches the query - does insert
// Postgres Note: `INSERT ... ON CONFLICT UPDATE` that is available since 9.5.
@@ -83,8 +87,8 @@ export default class MongoCollection {
return this._mongoCollection.deleteOne(query);
}
remove(query) {
return this._mongoCollection.remove(query);
deleteMany(query) {
return this._mongoCollection.deleteMany(query);
}
drop() {