object MapReduceAction
The map reduce to collection actions.
These actions are only available when passing out a collection that already exists. This option is not available on secondary members of replica sets. The Enum values dictate what to do with the output collection if it already exists when the map reduce is run.
- Annotations
- @deprecated
- Deprecated
(Since version 4.4.0) Superseded by aggregate
- Since
1.0
- Alphabetic
- By Inheritance
- MapReduceAction
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- val MERGE: com.mongodb.client.model.MapReduceAction
Merge the new result with the existing result if the output collection already exists.
Merge the new result with the existing result if the output collection already exists. If an existing document has the same key as the new result, overwrite that existing document.
- val REDUCE: com.mongodb.client.model.MapReduceAction
Merge the new result with the existing result if the output collection already exists.
Merge the new result with the existing result if the output collection already exists. If an existing document has the same key as the new result, apply the reduce function to both the new and the existing documents and overwrite the existing document with the result.
- val REPLACE: com.mongodb.client.model.MapReduceAction
Replace the contents of the
collectionName
if the collection with thecollectionName
exists.
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: