...

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

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

     1{
     2  "data": [
     3    {
     4      "_id": 1,
     5      "x": 11
     6    },
     7    {
     8      "_id": 2,
     9      "x": "ping"
    10    }
    11  ],
    12  "minServerVersion": "3.4",
    13  "serverless": "forbid",
    14  "tests": [
    15    {
    16      "description": "FindOneAndReplace when one document matches with collation returning the document after modification",
    17      "operation": {
    18        "name": "findOneAndReplace",
    19        "arguments": {
    20          "filter": {
    21            "x": "PING"
    22          },
    23          "replacement": {
    24            "x": "pong"
    25          },
    26          "projection": {
    27            "x": 1,
    28            "_id": 0
    29          },
    30          "returnDocument": "After",
    31          "sort": {
    32            "x": 1
    33          },
    34          "collation": {
    35            "locale": "en_US",
    36            "strength": 2
    37          }
    38        }
    39      },
    40      "outcome": {
    41        "result": {
    42          "x": "pong"
    43        },
    44        "collection": {
    45          "data": [
    46            {
    47              "_id": 1,
    48              "x": 11
    49            },
    50            {
    51              "_id": 2,
    52              "x": "pong"
    53            }
    54          ]
    55        }
    56      }
    57    }
    58  ]
    59}

View as plain text