云函数怎么实现类似SQL语句NOT IN联表操作 根据文档来 确实查出来了?
发布于 5 年前 作者 na06 11161 次浏览 来自 官方Issues
根据代码查出的是一条集合里面不包含本身id 但是其他id也会查出来
await db.collection('introduction').aggregate()
    .lookup({
      from'QRimages',
      let: {
        id: '$_id'
      },pipeline: $.pipeline()
        .match(_.expr(
          $.neq(['$id''$$id']),
        ))
        .done(),
        as'QRimagesList',
    })
    .end().then(res => { data = res.list;console.log(data);
    })

回到顶部