mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Merge pull request #28568 from ShopBonsai/master
Facet function for mongoose aggregate
This commit is contained in:
Vendored
+6
@@ -2354,6 +2354,12 @@ declare module "mongoose" {
|
||||
*/
|
||||
cursor(options: any): this;
|
||||
|
||||
/**
|
||||
* Appends a new $facet operator to this aggregate pipeline.
|
||||
* @param arg $facet operator contents
|
||||
*/
|
||||
facet(arg: { [outputField: string]: object[] }): this;
|
||||
|
||||
// If cursor option is on, could return an object
|
||||
/** Executes the aggregate pipeline on the currently bound Model. */
|
||||
exec(callback?: (err: any, result: T) => void): Promise<T> | any;
|
||||
|
||||
@@ -1237,6 +1237,7 @@ aggregate.append({ $project: { field: 1 }}, { $limit: 2 });
|
||||
aggregate.append([{ $match: { daw: 'Logic Audio X' }} ]);
|
||||
aggregate.collation({ locale: 'en_US', strength: 1 });
|
||||
aggregate.count('countName');
|
||||
aggregate.facet({ fieldA: [{ a: 1 }], fieldB: [{ b: 1 }] });
|
||||
aggregate.cursor({ batchSize: 1000 }).exec().each(cb);
|
||||
aggregate.exec().then(cb).catch(cb);
|
||||
aggregate.option({foo: 'bar'}).exec();
|
||||
|
||||
Reference in New Issue
Block a user