文档例子中bucket应该是bucketAuto
发布于 3 年前 作者 xiuying61 6390 次浏览 来自 问答

https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/aggregate/Aggregate.bucketAuto.html

db.collection('items').aggregate()
  .bucket({
    groupBy: '$price',
    buckets: 3,
  })
  .end()
1 回复

我们核实下

回到顶部