You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
1529
-
*
1530
-
* @deprecated collection.mapReduce is deprecated. Use the aggregation pipeline instead. Visit https://docs.mongodb.com/manual/reference/map-reduce-to-aggregation-pipeline for more information on how to translate map-reduce operations to the aggregation pipeline.
1531
-
* @param map - The mapping function.
1532
-
* @param reduce - The reduce function.
1533
-
* @param options - Optional settings for the command
1534
-
* @param callback - An optional callback, a Promise will be returned if none is provided
1535
-
*/
1536
-
mapReduce<TKey=any,TValue=any>(
1537
-
map: string|MapFunction<TSchema>,
1538
-
reduce: string|ReduceFunction<TKey,TValue>
1539
-
): Promise<Document|Document[]>;
1540
-
mapReduce<TKey=any,TValue=any>(
1541
-
map: string|MapFunction<TSchema>,
1542
-
reduce: string|ReduceFunction<TKey,TValue>,
1543
-
options: MapReduceOptions<TKey,TValue>
1544
-
): Promise<Document|Document[]>;
1545
-
/** @deprecated Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance */
1546
-
mapReduce<TKey=any,TValue=any>(
1547
-
map: string|MapFunction<TSchema>,
1548
-
reduce: string|ReduceFunction<TKey,TValue>,
1549
-
callback: Callback<Document|Document[]>
1550
-
): void;
1551
-
/** @deprecated Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance */
'collection.mapReduce is deprecated. Use the aggregation pipeline instead. Visit https://docs.mongodb.com/manual/reference/map-reduce-to-aggregation-pipeline for more information on how to translate map-reduce operations to the aggregation pipeline.'
0 commit comments