Type declaration
aggregate: ((collection: Source, pipeline: AnyObject[], options?: Partial<Options>) => AnyObject[])
- (collection, pipeline, options?): AnyObject[]
New array of results
- <T>(collection, criteria, projection?, options?): Cursor<T>
A cursor of results
Query: typeof Query
- (collection, criteria, options?): AnyObject[]
New filtered array
Return the result collection after running the aggregation pipeline for the given collection. Shorthand for
(new Aggregator(pipeline, options)).run(collection)