====================
Write Result Classes
====================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

MongoDB\\BulkWriteResult
------------------------

Definition
~~~~~~~~~~

.. phpclass:: MongoDB\\BulkWriteResult

   This class contains information about an executed bulk write operation. It
   encapsulates a :php:`MongoDB\\Driver\\WriteResult
   <class.mongodb-driver-writeresult>` object and is returned from
   :phpmethod:`MongoDB\\Collection::bulkWrite()`.

Methods
~~~~~~~

.. toctree::
   :titlesonly:

   /reference/method/MongoDBBulkWriteResult-getDeletedCount
   /reference/method/MongoDBBulkWriteResult-getInsertedCount
   /reference/method/MongoDBBulkWriteResult-getInsertedIds
   /reference/method/MongoDBBulkWriteResult-getMatchedCount
   /reference/method/MongoDBBulkWriteResult-getModifiedCount
   /reference/method/MongoDBBulkWriteResult-getUpsertedCount
   /reference/method/MongoDBBulkWriteResult-getUpsertedIds
   /reference/method/MongoDBBulkWriteResult-isAcknowledged

----

MongoDB\\DeleteResult
---------------------

Definition
~~~~~~~~~~

.. phpclass:: MongoDB\\DeleteResult

   This class contains information about an executed delete operation. It
   encapsulates a :php:`MongoDB\\Driver\\WriteResult
   <class.mongodb-driver-writeresult>` object and is returned from
   :phpmethod:`MongoDB\\Collection::deleteMany()` or
   :phpmethod:`MongoDB\\Collection::deleteOne()`.

Methods
~~~~~~~

.. toctree::
   :titlesonly:

   /reference/method/MongoDBDeleteResult-getDeletedCount
   /reference/method/MongoDBDeleteResult-isAcknowledged

----

MongoDB\\InsertManyResult
-------------------------

Definition
~~~~~~~~~~

.. phpclass:: MongoDB\\InsertManyResult

   This class contains information about an executed bulk insert operation. It
   encapsulates a :php:`MongoDB\\Driver\\WriteResult
   <class.mongodb-driver-writeresult>` object and is returned from
   :phpmethod:`MongoDB\\Collection::insertMany()`.

Methods
~~~~~~~

.. toctree::
   :titlesonly:

   /reference/method/MongoDBInsertManyResult-getInsertedCount
   /reference/method/MongoDBInsertManyResult-getInsertedIds
   /reference/method/MongoDBInsertManyResult-isAcknowledged

----

MongoDB\\InsertOneResult
------------------------

Definition
~~~~~~~~~~

.. phpclass:: MongoDB\\InsertOneResult

   This class contains information about an executed insert operation. It
   encapsulates a :php:`MongoDB\\Driver\\WriteResult
   <class.mongodb-driver-writeresult>` object and is returned from
   :phpmethod:`MongoDB\\Collection::insertOne()`.

Methods
~~~~~~~

.. toctree::
   :titlesonly:

   /reference/method/MongoDBInsertOneResult-getInsertedCount
   /reference/method/MongoDBInsertOneResult-getInsertedId
   /reference/method/MongoDBInsertOneResult-isAcknowledged

----

MongoDB\\UpdateResult
---------------------

Definition
~~~~~~~~~~

.. phpclass:: MongoDB\\UpdateResult

   This class contains information about an executed update or replace
   operation. It encapsulates a :php:`MongoDB\\Driver\\WriteResult
   <class.mongodb-driver-writeresult>` object and is returned from
   :phpmethod:`MongoDB\\Collection::replaceOne()`,
   :phpmethod:`MongoDB\\Collection::updateMany()`, or
   :phpmethod:`MongoDB\\Collection::updateOne()`.

Methods
~~~~~~~

.. toctree::
   :titlesonly:

   /reference/method/MongoDBUpdateResult-getMatchedCount
   /reference/method/MongoDBUpdateResult-getModifiedCount
   /reference/method/MongoDBUpdateResult-getUpsertedCount
   /reference/method/MongoDBUpdateResult-getUpsertedId
   /reference/method/MongoDBUpdateResult-isAcknowledged
