Sha256: 8f619aabfafef8fb205a5d8a5e1e42d6749d3e89f7e53a68e5546e697d93db73

Contents?: true

Size: 1.44 KB

Versions: 1

Compression:

Stored size: 1.44 KB

Contents

data:
    - {_id: 1, x: 11}
    - {_id: 2, x: 22}
    - {_id: 3, x: 33}
    - {_id: 4, x: 'ping'}

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

        outcome:
            result:
                - {_id: 2, x: 22}
                - {_id: 3, x: 33}
    -
        description: "Aggregate with $out"
        operation:
            name: aggregate
            arguments:
                pipeline: 
                    - $sort: {x: 1}
                    - $match:
                        _id: {$gt: 1, $lt: 4}
                    - $out: "other_test_collection"
                batchSize: 2

        outcome:
            result:
                - {_id: 2, x: 22}
                - {_id: 3, x: 33}
            collection:
                name: "other_test_collection"
                data:
                    - {_id: 2, x: 22}
                    - {_id: 3, x: 33}
    -
        description: "Aggregate with collation"
        operation:
            name: aggregate
            arguments:
                pipeline:
                    - $match:
                        x: 'PING'
                collation: { locale: 'en_US', strength: 2 }
        outcome:
            result:
                - {_id: 4, x: 'ping'}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo-2.4.0.rc0 spec/support/crud_tests/read/aggregate.yml