Class MapReduceOutputToCollectionOperation
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a map-reduce operation that outputs its results to a collection.
[Obsolete("Use Aggregation pipeline instead.")]
public class MapReduceOutputToCollectionOperation : MapReduceOperationBase, IWriteOperation<BsonDocument>
- Inheritance
-
MapReduceOutputToCollectionOperation
- Implements
- Inherited Members
- Extension Methods
Constructors
MapReduceOutputToCollectionOperation(CollectionNamespace, CollectionNamespace, BsonJavaScript, BsonJavaScript, MessageEncoderSettings)
Initializes a new instance of the MapReduceOutputToCollectionOperation class.
public MapReduceOutputToCollectionOperation(CollectionNamespace collectionNamespace, CollectionNamespace outputCollectionNamespace, BsonJavaScript mapFunction, BsonJavaScript reduceFunction, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
outputCollectionNamespace
CollectionNamespaceThe output collection namespace.
mapFunction
BsonJavaScriptThe map function.
reduceFunction
BsonJavaScriptThe reduce function.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
BypassDocumentValidation
Gets or sets a value indicating whether to bypass document validation.
public bool? BypassDocumentValidation { get; set; }
Property Value
- bool?
A value indicating whether to bypass document validation.
NonAtomicOutput
Gets or sets a value indicating whether the server should not lock the database for merge and reduce output modes.
[Obsolete("NonAtomicOutput is rejected by server versions 4.4.0 and newer.")]
public bool? NonAtomicOutput { get; set; }
Property Value
- bool?
true
if the server should not lock the database for merge and reduce output modes; otherwise,false
.
OutputCollectionNamespace
Gets the output collection namespace.
public CollectionNamespace OutputCollectionNamespace { get; }
Property Value
- CollectionNamespace
The output collection namespace.
OutputMode
Gets or sets the output mode.
public MapReduceOutputMode OutputMode { get; set; }
Property Value
- MapReduceOutputMode
The output mode.
ShardedOutput
Gets or sets a value indicating whether the output collection should be sharded.
[Obsolete("ShardedOutput is rejected by server versions 4.4.0 and newer.")]
public bool? ShardedOutput { get; set; }
Property Value
- bool?
true
if the output collection should be sharded; otherwise,false
.
WriteConcern
Gets or sets the write concern.
public WriteConcern WriteConcern { get; set; }
Property Value
- WriteConcern
The write concern.
Methods
CreateCommand(ICoreSessionHandle, ConnectionDescription)
Creates the command.
protected override BsonDocument CreateCommand(ICoreSessionHandle session, ConnectionDescription connectionDescription)
Parameters
session
ICoreSessionHandleThe session.
connectionDescription
ConnectionDescriptionThe connection description.
Returns
- BsonDocument
The command.
CreateOutputOptions()
Creates the output options.
protected override BsonDocument CreateOutputOptions()
Returns
- BsonDocument
The output options.
Execute(IWriteBinding, CancellationToken)
Executes the operation.
public BsonDocument Execute(IWriteBinding binding, CancellationToken cancellationToken)
Parameters
binding
IWriteBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- BsonDocument
The result of the operation.
ExecuteAsync(IWriteBinding, CancellationToken)
Executes the operation.
public Task<BsonDocument> ExecuteAsync(IWriteBinding binding, CancellationToken cancellationToken)
Parameters
binding
IWriteBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<BsonDocument>
A Task whose result is the result of the operation.