Support for Aggregate Queries (#4207)
* Support for Aggregate Queries * improve pg and coverage * Mongo 3.4 aggregates and tests * replace _id with objectId * improve tests for objectId * project with group query * typo
This commit is contained in:
committed by
Florent Vilmart
parent
4e207d32a7
commit
7223add446
@@ -60,6 +60,14 @@ export default class MongoCollection {
|
||||
return countOperation;
|
||||
}
|
||||
|
||||
distinct(field, query) {
|
||||
return this._mongoCollection.distinct(field, query);
|
||||
}
|
||||
|
||||
aggregate(pipeline, { maxTimeMS, readPreference } = {}) {
|
||||
return this._mongoCollection.aggregate(pipeline, { maxTimeMS, readPreference }).toArray();
|
||||
}
|
||||
|
||||
insertOne(object) {
|
||||
return this._mongoCollection.insertOne(object);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user