|
| __construct (WriteResult $writeResult, array $insertedIds) |
|
| getInsertedCount () |
| Return the number of documents that were inserted.
|
|
| getInsertedIds () |
| Return a map of the inserted documents' IDs.
|
|
| isAcknowledged () |
| Return whether this insert result was acknowledged by the server.
|
|
◆ getInsertedCount()
MongoDB\InsertManyResult::getInsertedCount |
( |
| ) |
|
Return the number of documents that were inserted.
This method should only be called if the write was acknowledged.
- See also
- InsertManyResult\isAcknowledged()
- Return values
-
- Exceptions
-
BadMethodCallException | is the write result is unacknowledged |
◆ getInsertedIds()
MongoDB\InsertManyResult::getInsertedIds |
( |
| ) |
|
Return a map of the inserted documents' IDs.
The index of each ID in the map corresponds to each document's position in the bulk operation. If a document had an ID prior to inserting (i.e. the driver did not generate an ID), the index will contain its "_id" field value. Any driver-generated ID will be a MongoDB\BSON\ObjectId instance.
- Return values
-
◆ isAcknowledged()
MongoDB\InsertManyResult::isAcknowledged |
( |
| ) |
|
Return whether this insert result was acknowledged by the server.
If the insert was not acknowledged, other fields from the WriteResult (e.g. insertedCount) will be undefined.
- Return values
-
The documentation for this class was generated from the following file:
- cache/stores/mongodb/MongoDB/InsertManyResult.php