...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/deleteMany-hint.yml

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

     1# This file was created automatically using mongodb-spec-converter.
     2# Please review the generated file, then remove this notice.
     3
     4description: deleteMany-hint
     5schemaVersion: '1.0'
     6runOnRequirements:
     7  -
     8    minServerVersion: 4.3.4
     9createEntities:
    10  -
    11    client:
    12      id: &client0 client0
    13      observeEvents:
    14        - commandStartedEvent
    15  -
    16    database:
    17      id: &database0 database0
    18      client: client0
    19      databaseName: &database_name crud-v2
    20  -
    21    collection:
    22      id: &collection0 collection0
    23      database: database0
    24      collectionName: &collection_name DeleteMany_hint
    25initialData:
    26  -
    27    collectionName: *collection_name
    28    databaseName: *database_name
    29    documents:
    30      -
    31        _id: 1
    32        x: 11
    33      -
    34        _id: 2
    35        x: 22
    36      -
    37        _id: 3
    38        x: 33
    39tests:
    40  -
    41    description: 'DeleteMany with hint string'
    42    operations:
    43      -
    44        object: *collection0
    45        name: deleteMany
    46        arguments:
    47          filter: &filter
    48            _id:
    49              $gt: 1
    50          hint: _id_
    51        expectResult: &result
    52          deletedCount: 2
    53    expectEvents:
    54      -
    55        client: *client0
    56        events:
    57          -
    58            commandStartedEvent:
    59              command:
    60                delete: *collection_name
    61                deletes:
    62                  -
    63                    q: *filter
    64                    hint: _id_
    65                    limit: 0
    66    outcome: &outcome
    67      -
    68        collectionName: *collection_name
    69        databaseName: *database_name
    70        documents:
    71          -
    72            _id: 1
    73            x: 11
    74  -
    75    description: 'DeleteMany with hint document'
    76    operations:
    77      -
    78        object: *collection0
    79        name: deleteMany
    80        arguments:
    81          filter: *filter
    82          hint:
    83            _id: 1
    84        expectResult: *result
    85    expectEvents:
    86      -
    87        client: *client0
    88        events:
    89          -
    90            commandStartedEvent:
    91              command:
    92                delete: *collection_name
    93                deletes:
    94                  -
    95                    q: *filter
    96                    hint:
    97                      _id: 1
    98                    limit: 0
    99    outcome: *outcome

View as plain text