unicloud分组统计,出现错误:
error: {code: '"FunctionBizError"', message: '":db.collection(...).where(...).groupBy is not a function"
代码:
res= await db.collection('stockout_info').where({'stockout_id':id})
.groupBy('p_type')
.groupField('sum(qty) as totalQty')
.get()
不知晚不晚
- 发布:2022-04-20 20:34
- 更新:2023-12-03 16:20
- 阅读:519
groupby出现错误!
分类:uniCloud
t***@126.com
TypeError: db.collection(...).group is not a function
2023-04-09 15:22
DCloud_uniCloud_WYQ
回复 t***@126.com: https://uniapp.dcloud.net.cn/uniCloud/cf-database-aggregate.html#aggregate-group
2023-04-10 11:07
6***@qq.com
jql 扩展是有的呀, "uni-cloud-jql": {}
2023-12-03 16:20
DCloud_uniCloud_WYQ
回复 6***@qq.com: db对象需要用uniCloud.databaseForJQL()方法获取
2023-12-04 11:09