聚合操作in提示参数不对

发布于 8 年前作者 juancheng15078 次浏览最后编辑 8 年前来自 issues

代码:

const db = getApp().globalData.db
const $ = db.command.aggregate
db.collection('lyriclist').aggregate()
    // .count('count')
    .project({
        first: $.in('aaa', '$collected'),
    })
    // .skip()
    // .limit(10)
    .sort({
        createTime: -1
    })
    .end({
        success: console.log,
        fail: console.error
    })

结果:

2 回复
slin
slin1 楼6 年前

同样遇到这个问题哎

nazeng
nazeng2 楼6 年前

不好意思是文档示例的错误,这里需要传入数组