Method BucketAuto
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
BucketAuto<TResult, TValue>(IAggregateFluent, Expression<Func<TResult, TValue>>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
public static IAggregateFluent<AggregateBucketAutoResult<TValue>> BucketAuto<TResult, TValue>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TValue>> groupBy, int buckets, AggregateBucketAutoOptions options = null)Parameters
aggregate IAggregateFluent
The aggregate.
groupBy Expression<Func<TResult, TValue>>
The expression providing the value to group by.
buckets int
The number of buckets.
options AggregateBucketAutoOptions
The options (optional).
Returns
IAggregateFluent<AggregateBucketAutoResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TValue
The type of the value.
BucketAuto<TResult, TValue, TNewResult>(IAggregateFluent, Expression<Func<TResult, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId, TResult>, TNewResult>>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline (this overload can only be used with LINQ3).
public static IAggregateFluent<TNewResult> BucketAuto<TResult, TValue, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TValue>> groupBy, int buckets, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TResult>, TNewResult>> output, AggregateBucketAutoOptions options = null)Parameters
aggregate IAggregateFluent
The aggregate.
groupBy Expression<Func<TResult, TValue>>
The expression providing the value to group by.
buckets int
The number of buckets.
output Expression<Func<IGrouping<AggregateBucketAutoResultId, TResult>, TNewResult>>
The output projection.
options AggregateBucketAutoOptions
The options (optional).
Returns
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TValue
The type of the value.
TNewResult
The type of the new result.