@@ -88,7 +88,7 @@ Modify the Delete Operation
88
88
---------------------------
89
89
90
90
You can modify the behavior of the ``MongoDB\Collection::deleteOne()`` and
91
- ``MongoDB\Collection::deleteMany()`` methods by by passing an array that
91
+ ``MongoDB\Collection::deleteMany()`` methods by passing an array that
92
92
specifies option values as a parameter. The following table describes the
93
93
options you can set in the array:
94
94
@@ -100,12 +100,13 @@ options you can set in the array:
100
100
- Description
101
101
102
102
* - ``collation``
103
- - | Specifies the kind of language collation to use when sorting
104
- results . For more information, see :manual:`Collation </reference/collation/#std-label-collation>`
103
+ - | Specifies the kind of language collation to use when comparing
104
+ strings . For more information, see :manual:`Collation </reference/collation/#std-label-collation>`
105
105
in the {+mdb-server+} manual.
106
106
107
107
* - ``writeConcern``
108
- - | Sets the write concern for the operation.
108
+ - | Sets the write concern for the operation. This option defaults to
109
+ the collection's write concern.
109
110
For more information, see :manual:`Write Concern </reference/write-concern/>`
110
111
in the {+mdb-server+} manual.
111
112
@@ -159,8 +160,9 @@ methods return a ``MongoDB\DeleteResult`` object. This class contains the
159
160
following member functions:
160
161
161
162
- ``isAcknowledged()``, which returns a boolean indicating whether the operation
162
- was acknowledged
163
- - ``getDeletedCount()``, which returns the number of documents deleted
163
+ was acknowledged.
164
+ - ``getDeletedCount()``, which returns the number of documents deleted. If the write
165
+ operation was not acknowledged, this method throws an error.
164
166
165
167
If the query filter does not match any documents, the driver doesn't delete any
166
168
documents and ``getDeletedCount()`` returns ``0``.
0 commit comments