summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/go.mongodb.org/mongo-driver/data/crud/v1/read/aggregate.yml
blob: 98b69445c2625b2a224573d3ee2428e27480a829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
data:
    - {_id: 1, x: 11}
    - {_id: 2, x: 22}
    - {_id: 3, x: 33}

tests:
    -
        description: "Aggregate with multiple stages"
        operation:
            name: aggregate
            arguments:
                pipeline:
                    - $sort: {x: 1}
                    - $match: 
                        _id: {$gt: 1}
                batchSize: 2

        outcome:
            result:
                - {_id: 2, x: 22}
                - {_id: 3, x: 33}