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