MongoDB\DeleteResult Class

For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

MongoDB\DeleteResult Class

Definition

This class contains information about an executed delete operation. It encapsulates a MongoDB\Driver\WriteResult object and is returned from [MongoDB\Collection::deleteMany()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbcollection-deletemany.md#mongodb-phpmethod-phpmethod.MongoDB-Collection--deleteMany-- or [MongoDB\Collection::deleteOne().](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbcollection-deleteone.md#mongodb-phpmethod-phpmethod.MongoDB-Collection--deleteOne--

Methods

  • [MongoDB\DeleteResult::getDeletedCount()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbdeleteresult-getdeletedcount.md#mongodb-phpmethod-phpmethod.MongoDB-DeleteResult--getDeletedCount--

  • [MongoDB\DeleteResult::isAcknowledged()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbdeleteresult-isacknowledged.md#mongodb-phpmethod-phpmethod.MongoDB-DeleteResult--isAcknowledged--