本文整理了Java中com.mongodb.client.model.Aggregates.bucketAuto()
方法的一些代码示例,展示了Aggregates.bucketAuto()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Aggregates.bucketAuto()
方法的具体详情如下:
包路径:com.mongodb.client.model.Aggregates
类名称:Aggregates
方法名:bucketAuto
[英]Creates a $bucketAuto pipeline stage
[中]创建$bucketAuto管道阶段
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Creates a $bucketAuto pipeline stage
*
* @param <TExpression> the groupBy expression type
* @param groupBy the criteria to group By
* @param buckets the number of the buckets
* @return the $bucketAuto pipeline stage
* @mongodb.driver.manual reference/operator/aggregation/bucketAuto/ $bucketAuto
* @mongodb.server.release 3.4
* @since 3.4
*/
public static <TExpression> Bson bucketAuto(final TExpression groupBy, final int buckets) {
return bucketAuto(groupBy, buckets, new BucketAutoOptions());
}
代码示例来源:origin: org.mongodb/mongodb-driver-core
/**
* Creates a $bucketAuto pipeline stage
*
* @param <TExpression> the groupBy expression type
* @param groupBy the criteria to group By
* @param buckets the number of the buckets
* @return the $bucketAuto pipeline stage
* @mongodb.driver.manual reference/operator/aggregation/bucketAuto/ $bucketAuto
* @mongodb.server.release 3.4
* @since 3.4
*/
public static <TExpression> Bson bucketAuto(final TExpression groupBy, final int buckets) {
return bucketAuto(groupBy, buckets, new BucketAutoOptions());
}
内容来源于网络,如有侵权,请联系作者删除!