Method Bucket
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null)Parameters
pipeline PipelineDefinition<TInput, TIntermediate>
The pipeline.
groupBy AggregateExpressionDefinition<TIntermediate, TValue>
The group by expression.
boundaries IEnumerable
The boundaries.
options AggregateBucketOptions
The options.
Returns
PipelineDefinition<TInput, AggregateBucketResult>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the values.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable, ProjectionDefinition<TIntermediate, TOutput>, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Bucket<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, IEnumerable<TValue> boundaries, ProjectionDefinition<TIntermediate, TOutput> output, AggregateBucketOptions<TValue> options = null)Parameters
pipeline PipelineDefinition<TInput, TIntermediate>
The pipeline.
groupBy AggregateExpressionDefinition<TIntermediate, TValue>
The group by expression.
boundaries IEnumerable
The boundaries.
output ProjectionDefinition<TIntermediate, TOutput>
The output projection.
options AggregateBucketOptions
The options.
Returns
PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the values.
TOutput
The type of the output documents.
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null)Parameters
pipeline PipelineDefinition<TInput, TIntermediate>
The pipeline.
groupBy Expression<Func<TIntermediate, TValue>>
The group by expression.
boundaries IEnumerable
The boundaries.
options AggregateBucketOptions
The options.
Returns
PipelineDefinition<TInput, AggregateBucketResult>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the values.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable, Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>>, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Bucket<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, IEnumerable<TValue> boundaries, Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>> output, AggregateBucketOptions<TValue> options = null)Parameters
pipeline PipelineDefinition<TInput, TIntermediate>
The pipeline.
groupBy Expression<Func<TIntermediate, TValue>>
The group by expression.
boundaries IEnumerable
The boundaries.
output Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>>
The output projection.
options AggregateBucketOptions
The options.
Returns
PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the values.
TOutput
The type of the output documents.