Method SetWindowFields

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

SetWindowFields<TInput, TIntermediate, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<ISetWindowFieldsPartition, 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, 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, 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, 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, AggregateExpressionDefinition<ISetWindowFieldsPartition, 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

The sortBy expression.

output AggregateExpressionDefinition<ISetWindowFieldsPartition, 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, 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, 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, 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, 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, Expression<Func<ISetWindowFieldsPartition, 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

The sortBy expression.

output Expression<Func<ISetWindowFieldsPartition, 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.