Method SetWindowFields
SetWindowFields<TInput, TIntermediate, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>)
Create a $setWindowFields stage.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
outputAggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TWindowFieldsThe type of the added window fields.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TPartitionBy>, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>)
Appends a $setWindowFields stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TPartitionBy> partitionBy, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
partitionByAggregateExpressionDefinition<TIntermediate, TPartitionBy>The partitionBy expression.
outputAggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TPartitionByThe type of the value to partition by.
TWindowFieldsThe type of the added window fields.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TPartitionBy>, SortDefinition<TIntermediate>, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>)
Appends a $setWindowFields stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TPartitionBy> partitionBy, SortDefinition<TIntermediate> sortBy, AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
partitionByAggregateExpressionDefinition<TIntermediate, TPartitionBy>The partitionBy expression.
sortBySortDefinition<TIntermediate>The sortBy expression.
outputAggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TPartitionByThe type of the value to partition by.
TWindowFieldsThe type of the added window fields.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
outputExpression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TPartitionByThe type of the value to partition by.
TWindowFieldsThe type of the added window fields.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TPartitionBy>>, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TPartitionBy>> partitionBy, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
partitionByExpression<Func<TIntermediate, TPartitionBy>>The partitionBy expression.
outputExpression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TPartitionByThe type of the value to partition by.
TWindowFieldsThe type of the added window fields.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TPartitionBy>>, SortDefinition<TIntermediate>, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
public static PipelineDefinition<TInput, BsonDocument> SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TPartitionBy>> partitionBy, SortDefinition<TIntermediate> sortBy, Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>> output)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
partitionByExpression<Func<TIntermediate, TPartitionBy>>The partitionBy expression.
sortBySortDefinition<TIntermediate>The sortBy expression.
outputExpression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>The window fields expression.
Returns
- PipelineDefinition<TInput, BsonDocument>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TPartitionByThe type of the value to partition by.
TWindowFieldsThe type of the added window fields.