云数据库里这些aggregate函数都不能用在查询条件里吗?$.in $.indexOf
发布于 7 年前 作者 mxia 723 次浏览 来自 问答

试了$.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({...})
回到顶部