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