I've read that aggregation framework relies on "pipeline" architecture, i.e.
db.myCollection.aggregate({
$op1: { ... }
},{
$op2: { ... }
})
On the other hand, the "traditional" mongo command-line query syntax is also pipeline-like:
db.myCollection.find({
field: 'value'
}).filter({
...
}).forEach({
...
})
- Is there any difference in the implementation under the hood?
- The "traditional" syntax is also kinda pipeline-like - why the alternative syntax exist at all?