【笔记】云函数,聚合函数aggregate不支持where,只能是纯聚合
发布于 4 年前 作者 xia28 2030 次浏览 来自 分享

占位

db.collection('question').where({

      category: _id

    })

    .aggregate()

    .sample({

      size: num

    })

    .end()

    .then(res => {

      console.log('[数据库] [查询记录] 成功: ', res)

    })

占位

占位

回到顶部