File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,40 @@ We now require node 12.9 or greater for version 4 of the driver.
27
27
If that's outside your support matrix at this time, that's okay!
28
28
Bug fix support for our 3.x branch will not be ending until summer 2022, which has support going back as far as Node.js v4!
29
29
30
+ ### CRUD results
31
+
32
+ Our CRUD operations now return the drivers-wide spec-compliant results which are defined here:
33
+
34
+ - [ CRUD SPEC Write Results] ( https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#write-results )
35
+
36
+ For example, ` insertOne() ` used to return an object that was shaped like:
37
+
38
+ ``` typescript
39
+ interface LegacyInsertOneResult {
40
+ insertedCount: number ;
41
+ ops: InsertedDocument [];
42
+ insertedId: ObjectId ;
43
+ connection: Connection ;
44
+ result: { ok: number ; n: number };
45
+ }
46
+ ```
47
+
48
+ and now returns:
49
+
50
+ ``` typescript
51
+ interface InsertOneResult {
52
+ /**
53
+ * Indicates whether this write result was acknowledged. If not, then all
54
+ * other members of this result will be undefined.
55
+ */
56
+ acknowledged: boolean ;
57
+
58
+ /**
59
+ * The identifier that was inserted. */
60
+ insertedId: ObjectId ;
61
+ }
62
+ ```
63
+
30
64
### Cursor changes
31
65
32
66
Affected classes:
You can’t perform that action at this time.
0 commit comments