云数据库里这些aggregate函数都不能用在查询条件里吗?$.in $.indexOf

发布于 9 年前作者 mxia835 次浏览最后编辑 9 年前来自 ask

试了$.in 和 $.indexOf都得不到预期的查询结果,supplierId是一个数组字段

await db.collection('products').where(_.expr(
        $.in(['xx', '$supplierId'])
      )).update({})

await db.collection('products')
	.where(_.expr(
	  $.neq([$.indexOfArray(['$supplierId', 'xx']), -1])
	)).update({...})
0 回复
暂无回复