IMongoCollectionTDocumentAggregateToCollectionTResult Method (IClientSessionHandle, PipelineDefinitionTDocument, TResult, AggregateOptions, CancellationToken) |
Runs an aggregation pipeline whose results are written to a collection.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax void AggregateToCollection<TResult>(
IClientSessionHandle session,
PipelineDefinition<TDocument, TResult> pipeline,
AggregateOptions options = null,
CancellationToken cancellationToken = default
)
Sub AggregateToCollection(Of TResult) (
session As IClientSessionHandle,
pipeline As PipelineDefinition(Of TDocument, TResult),
Optional options As AggregateOptions = Nothing,
Optional cancellationToken As CancellationToken = Nothing
)
abstract AggregateToCollection :
session : IClientSessionHandle *
pipeline : PipelineDefinition<'TDocument, 'TResult> *
?options : AggregateOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _options = defaultArg options null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> unit
Parameters
- session
- Type: MongoDB.DriverIClientSessionHandle
The session. - pipeline
- Type: MongoDB.DriverPipelineDefinitionTDocument, TResult
The pipeline. - options (Optional)
- Type: MongoDB.DriverAggregateOptions
The options. - cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
The cancellation token.
Type Parameters
- TResult
- The type of the result.
See Also