MongoDB\InsertOneResult Class
For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt
MongoDB\InsertOneResult Class
Definition
This class contains information about an executed insert operation. It encapsulates a MongoDB\Driver\WriteResult object and is returned from [MongoDB\Collection::insertOne().](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbcollection-insertone.md#mongodb-phpmethod-phpmethod.MongoDB-Collection--insertOne--
Methods
-
[
MongoDB\InsertOneResult::getInsertedCount()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbinsertoneresult-getinsertedcount.md#mongodb-phpmethod-phpmethod.MongoDB-InsertOneResult--getInsertedCount-- -
[
MongoDB\InsertOneResult::getInsertedId()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbinsertoneresult-getinsertedid.md#mongodb-phpmethod-phpmethod.MongoDB-InsertOneResult--getInsertedId-- -
[
MongoDB\InsertOneResult::isAcknowledged()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbinsertoneresult-isacknowledged.md#mongodb-phpmethod-phpmethod.MongoDB-InsertOneResult--isAcknowledged--
