...
1# This file was created automatically using mongodb-spec-converter.
2# Please review the generated file, then remove this notice.
3
4description: findOneAndDelete-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 findOneAndDelete_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
36tests:
37 -
38 description: 'FindOneAndDelete with hint string'
39 operations:
40 -
41 object: *collection0
42 name: findOneAndDelete
43 arguments:
44 filter: &filter
45 _id: 1
46 hint: _id_
47 expectResult: &result
48 _id: 1
49 x: 11
50 expectEvents:
51 -
52 client: *client0
53 events:
54 -
55 commandStartedEvent:
56 command:
57 findAndModify: *collection_name
58 query: *filter
59 hint: _id_
60 remove: true
61 outcome: &outcome
62 -
63 collectionName: *collection_name
64 databaseName: *database_name
65 documents:
66 -
67 _id: 2
68 x: 22
69 -
70 description: 'FindOneAndDelete with hint document'
71 operations:
72 -
73 object: *collection0
74 name: findOneAndDelete
75 arguments:
76 filter: &filter
77 _id: 1
78 hint:
79 _id: 1
80 expectResult: &result
81 _id: 1
82 x: 11
83 expectEvents:
84 -
85 client: *client0
86 events:
87 -
88 commandStartedEvent:
89 command:
90 findAndModify: *collection_name
91 query: *filter
92 hint:
93 _id: 1
94 remove: true
95 outcome: &outcome
96 -
97 collectionName: *collection_name
98 databaseName: *database_name
99 documents:
100 -
101 _id: 2
102 x: 22
View as plain text