Table of Contents

Method SetWindowFields

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

output AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TWindowFields

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

partitionBy AggregateExpressionDefinition<TIntermediate, TPartitionBy>

The partitionBy expression.

output AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TPartitionBy

The type of the value to partition by.

TWindowFields

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

partitionBy AggregateExpressionDefinition<TIntermediate, TPartitionBy>

The partitionBy expression.

sortBy SortDefinition<TIntermediate>

The sortBy expression.

output AggregateExpressionDefinition<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TPartitionBy

The type of the value to partition by.

TWindowFields

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

output Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TPartitionBy

The type of the value to partition by.

TWindowFields

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

partitionBy Expression<Func<TIntermediate, TPartitionBy>>

The partitionBy expression.

output Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TPartitionBy

The type of the value to partition by.

TWindowFields

The 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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

partitionBy Expression<Func<TIntermediate, TPartitionBy>>

The partitionBy expression.

sortBy SortDefinition<TIntermediate>

The sortBy expression.

output Expression<Func<ISetWindowFieldsPartition<TIntermediate>, TWindowFields>>

The window fields expression.

Returns

PipelineDefinition<TInput, BsonDocument>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TPartitionBy

The type of the value to partition by.

TWindowFields

The type of the added window fields.