Table of Contents

Method BucketAuto

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

BucketAuto<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>, int, AggregateBucketAutoOptions)

Creates a $bucketAuto stage.

public static PipelineStageDefinition<TInput, AggregateBucketAutoResult<TValue>> BucketAuto<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue> groupBy, int buckets, AggregateBucketAutoOptions options = null)

Parameters

groupBy AggregateExpressionDefinition<TInput, TValue>

The group by expression.

buckets int

The number of buckets.

options AggregateBucketAutoOptions

The options.

Returns

PipelineStageDefinition<TInput, AggregateBucketAutoResult<TValue>>

The stage.

Type Parameters

TInput

The type of the input documents.

TValue

The type of the values.

BucketAuto<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue>, int, ProjectionDefinition<TInput, TOutput>, AggregateBucketAutoOptions)

Creates a $bucketAuto stage.

public static PipelineStageDefinition<TInput, TOutput> BucketAuto<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue> groupBy, int buckets, ProjectionDefinition<TInput, TOutput> output, AggregateBucketAutoOptions options = null)

Parameters

groupBy AggregateExpressionDefinition<TInput, TValue>

The group by expression.

buckets int

The number of buckets.

output ProjectionDefinition<TInput, TOutput>

The output projection.

options AggregateBucketAutoOptions

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.

BucketAuto<TInput, TValue>(Expression<Func<TInput, TValue>>, int, AggregateBucketAutoOptions, ExpressionTranslationOptions)

Creates a $bucketAuto stage.

public static PipelineStageDefinition<TInput, AggregateBucketAutoResult<TValue>> BucketAuto<TInput, TValue>(Expression<Func<TInput, TValue>> groupBy, int buckets, AggregateBucketAutoOptions options = null, ExpressionTranslationOptions translationOptions = null)

Parameters

groupBy Expression<Func<TInput, TValue>>

The group by expression.

buckets int

The number of buckets.

options AggregateBucketAutoOptions

The options (optional).

translationOptions ExpressionTranslationOptions

The translation options.

Returns

PipelineStageDefinition<TInput, AggregateBucketAutoResult<TValue>>

The stage.

Type Parameters

TInput

The type of the input documents.

TValue

The type of the value.

BucketAuto<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TInput>, TOutput>>, AggregateBucketAutoOptions, ExpressionTranslationOptions)

Creates a $bucketAuto stage (this overload can only be used with LINQ3).

public static PipelineStageDefinition<TInput, TOutput> BucketAuto<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>> groupBy, int buckets, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TInput>, TOutput>> output, AggregateBucketAutoOptions options = null, ExpressionTranslationOptions translationOptions = null)

Parameters

groupBy Expression<Func<TInput, TValue>>

The group by expression.

buckets int

The number of buckets.

output Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TInput>, TOutput>>

The output projection.

options AggregateBucketAutoOptions

The options (optional).

translationOptions ExpressionTranslationOptions

The translation options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TValue

The type of the output documents.

TOutput

The type of the output documents.