File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ class BulkWriteResult implements Unserializable
3636 */
3737 private $ deletedCount ;
3838
39+ /**
40+ * @var int
41+ */
42+ private $ insertedCount ;
43+
3944 /**
4045 * @var array<ObjectId>
4146 */
@@ -47,6 +52,7 @@ public function bsonUnserialize(array $data)
4752 $ this ->modifiedCount = $ data ['modifiedcount ' ];
4853 $ this ->upsertedCount = $ data ['upsertedcount ' ];
4954 $ this ->deletedCount = $ data ['deletedcount ' ];
55+ $ this ->insertedCount = $ data ['insertedcount ' ];
5056 $ this ->upsertedIds = (array ) $ data ['upsertedids ' ];
5157 }
5258
@@ -74,4 +80,10 @@ public function getUpsertedIds(): array
7480 {
7581 return (array ) $ this ->upsertedIds ;
7682 }
83+
84+ public function getinsertedCount (): int
85+ {
86+ return $ this ->insertedCount ;
87+ }
88+
7789}
You can’t perform that action at this time.
0 commit comments