...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/v1/write/findOneAndUpdate-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      "_id": 3,
    13      "x": "pINg"
    14    }
    15  ],
    16  "minServerVersion": "3.4",
    17  "serverless": "forbid",
    18  "tests": [
    19    {
    20      "description": "FindOneAndUpdate when many documents match with collation returning the document before modification",
    21      "operation": {
    22        "name": "findOneAndUpdate",
    23        "arguments": {
    24          "filter": {
    25            "x": "PING"
    26          },
    27          "update": {
    28            "$set": {
    29              "x": "pong"
    30            }
    31          },
    32          "projection": {
    33            "x": 1,
    34            "_id": 0
    35          },
    36          "sort": {
    37            "_id": 1
    38          },
    39          "collation": {
    40            "locale": "en_US",
    41            "strength": 2
    42          }
    43        }
    44      },
    45      "outcome": {
    46        "result": {
    47          "x": "ping"
    48        },
    49        "collection": {
    50          "data": [
    51            {
    52              "_id": 1,
    53              "x": 11
    54            },
    55            {
    56              "_id": 2,
    57              "x": "pong"
    58            },
    59            {
    60              "_id": 3,
    61              "x": "pINg"
    62            }
    63          ]
    64        }
    65      }
    66    }
    67  ]
    68}

View as plain text