【发布时间】:2018-06-14 19:35:11
【问题描述】:
聚合游标对已使用集合中的 CRUD(remove R) 操作有何反应? 例如:
db.collection('aggregate')
.aggregate([
{$match: {}},
{$project:
{ newField: {$literal: "new value"} }
}
]).each(function(err, doc) {
// do editin inserting and removing on 'aggregate' collection
print(doc)
});
算法是否有机会打印在其操作过程中添加或更改的记录?
【问题讨论】:
标签: node.js mongodb node-mongodb-native