...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/v1/write/updateOne-collation.yml

Documentation: go.mongodb.org/mongo-driver/testdata/crud/v1/write

     1data:
     2    - {_id: 1, x: 11}
     3    - {_id: 2, x: 'ping'}
     4minServerVersion: '3.4'
     5serverless: 'forbid'
     6
     7tests:
     8    -
     9        description: "UpdateOne when one document matches with collation"
    10        operation:
    11            name: "updateOne"
    12            arguments:
    13                filter: {x: 'PING'}
    14                update:
    15                    $set: {x: 'pong'}
    16                collation: { locale: 'en_US', strength: 2} # https://www.mongodb.com/docs/manual/reference/collation/#collation-document
    17
    18        outcome:
    19            result:
    20                matchedCount: 1
    21                modifiedCount: 1
    22                upsertedCount: 0
    23            collection:
    24                data:
    25                    - {_id: 1, x: 11}
    26                    - {_id: 2, x: 'pong'}

View as plain text