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