...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/v1/write/bulkWrite-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      "_id": 4,
    17      "x": "pong"
    18    },
    19    {
    20      "_id": 5,
    21      "x": "pONg"
    22    }
    23  ],
    24  "minServerVersion": "3.4",
    25  "serverless": "forbid",
    26  "tests": [
    27    {
    28      "description": "BulkWrite with delete operations and collation",
    29      "operation": {
    30        "name": "bulkWrite",
    31        "arguments": {
    32          "requests": [
    33            {
    34              "name": "deleteOne",
    35              "arguments": {
    36                "filter": {
    37                  "x": "PING"
    38                },
    39                "collation": {
    40                  "locale": "en_US",
    41                  "strength": 2
    42                }
    43              }
    44            },
    45            {
    46              "name": "deleteOne",
    47              "arguments": {
    48                "filter": {
    49                  "x": "PING"
    50                },
    51                "collation": {
    52                  "locale": "en_US",
    53                  "strength": 2
    54                }
    55              }
    56            },
    57            {
    58              "name": "deleteMany",
    59              "arguments": {
    60                "filter": {
    61                  "x": "PONG"
    62                },
    63                "collation": {
    64                  "locale": "en_US",
    65                  "strength": 2
    66                }
    67              }
    68            }
    69          ],
    70          "options": {
    71            "ordered": true
    72          }
    73        }
    74      },
    75      "outcome": {
    76        "result": {
    77          "deletedCount": 4,
    78          "insertedCount": 0,
    79          "insertedIds": {},
    80          "matchedCount": 0,
    81          "modifiedCount": 0,
    82          "upsertedCount": 0,
    83          "upsertedIds": {}
    84        },
    85        "collection": {
    86          "data": [
    87            {
    88              "_id": 1,
    89              "x": 11
    90            }
    91          ]
    92        }
    93      }
    94    },
    95    {
    96      "description": "BulkWrite with update operations and collation",
    97      "operation": {
    98        "name": "bulkWrite",
    99        "arguments": {
   100          "requests": [
   101            {
   102              "name": "updateMany",
   103              "arguments": {
   104                "filter": {
   105                  "x": "ping"
   106                },
   107                "update": {
   108                  "$set": {
   109                    "x": "PONG"
   110                  }
   111                },
   112                "collation": {
   113                  "locale": "en_US",
   114                  "strength": 3
   115                }
   116              }
   117            },
   118            {
   119              "name": "updateOne",
   120              "arguments": {
   121                "filter": {
   122                  "x": "ping"
   123                },
   124                "update": {
   125                  "$set": {
   126                    "x": "PONG"
   127                  }
   128                },
   129                "collation": {
   130                  "locale": "en_US",
   131                  "strength": 2
   132                }
   133              }
   134            },
   135            {
   136              "name": "replaceOne",
   137              "arguments": {
   138                "filter": {
   139                  "x": "ping"
   140                },
   141                "replacement": {
   142                  "_id": 6,
   143                  "x": "ping"
   144                },
   145                "upsert": true,
   146                "collation": {
   147                  "locale": "en_US",
   148                  "strength": 3
   149                }
   150              }
   151            },
   152            {
   153              "name": "updateMany",
   154              "arguments": {
   155                "filter": {
   156                  "x": "pong"
   157                },
   158                "update": {
   159                  "$set": {
   160                    "x": "PONG"
   161                  }
   162                },
   163                "collation": {
   164                  "locale": "en_US",
   165                  "strength": 2
   166                }
   167              }
   168            }
   169          ],
   170          "options": {
   171            "ordered": true
   172          }
   173        }
   174      },
   175      "outcome": {
   176        "result": {
   177          "deletedCount": 0,
   178          "insertedCount": 0,
   179          "insertedIds": {},
   180          "matchedCount": 6,
   181          "modifiedCount": 4,
   182          "upsertedCount": 1,
   183          "upsertedIds": {
   184            "2": 6
   185          }
   186        },
   187        "collection": {
   188          "data": [
   189            {
   190              "_id": 1,
   191              "x": 11
   192            },
   193            {
   194              "_id": 2,
   195              "x": "PONG"
   196            },
   197            {
   198              "_id": 3,
   199              "x": "PONG"
   200            },
   201            {
   202              "_id": 4,
   203              "x": "PONG"
   204            },
   205            {
   206              "_id": 5,
   207              "x": "PONG"
   208            },
   209            {
   210              "_id": 6,
   211              "x": "ping"
   212            }
   213          ]
   214        }
   215      }
   216    }
   217  ]
   218}

View as plain text