Skip to content

Commit 27f42bc

Browse files
authored
JT small fix (#209)
1 parent 67adb57 commit 27f42bc

6 files changed

+32
-6
lines changed

source/reference/method/MongoDBCollection-bulkWrite.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,15 @@ Behavior
141141
.. include:: /includes/extracts/bulkwriteexception-result.rst
142142
.. include:: /includes/extracts/bulkwriteexception-ordered.rst
143143

144-
.. todo: add output and examples
145-
146144
See Also
147145
--------
148146

147+
- :ref:`php-bulk-write`
148+
- :ref:`php-write`
149149
- :phpmethod:`MongoDB\Collection::deleteMany()`
150150
- :phpmethod:`MongoDB\Collection::deleteOne()`
151151
- :phpmethod:`MongoDB\Collection::insertMany()`
152152
- :phpmethod:`MongoDB\Collection::insertOne()`
153153
- :phpmethod:`MongoDB\Collection::replaceOne()`
154154
- :phpmethod:`MongoDB\Collection::updateMany()`
155155
- :phpmethod:`MongoDB\Collection::updateOne()`
156-
- :ref:`php-write`

source/reference/method/MongoDBCollection-replaceOne.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
MongoDB\\Collection::replaceOne()
33
=================================
44

5-
65
.. contents:: On this page
76
:local:
87
:backlinks: none
@@ -89,6 +88,14 @@ Parameters
8988

9089
.. versionadded:: 1.3
9190

91+
* - sort
92+
- array|object
93+
- The sort specification for the ordering of the matched
94+
documents. Set this option to apply an order to matched
95+
documents before the server performs the replace operation.
96+
97+
.. versionadded:: 1.21
98+
9299
* - upsert
93100
- boolean
94101
- If set to ``true``, creates a new document when no document matches the

source/reference/method/MongoDBCollection-updateOne.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
MongoDB\\Collection::updateOne()
33
================================
44

5-
65
.. contents:: On this page
76
:local:
87
:backlinks: none
@@ -94,6 +93,14 @@ Parameters
9493

9594
.. versionadded:: 1.3
9695

96+
* - sort
97+
- array|object
98+
- The sort specification for the ordering of the matched
99+
documents. Set this option to apply an order to matched
100+
documents before the server performs the update operation.
101+
102+
.. versionadded:: 1.21
103+
97104
* - upsert
98105
- boolean
99106
- If set to ``true``, creates a new document when no document matches the

source/whats-new.txt

+5
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ improvements, and fixes:
149149
- Deprecates the ``flags`` option, used for the deprecated MMAPv1 storage engine.
150150
This option will be removed in {+library-short+} v2.0.
151151

152+
- Adds a sort option to the :phpmethod:`MongoDB\Collection::updateOne()`
153+
and :phpmethod:`MongoDB\Collection::replaceOne()` methods. This
154+
change also allows you to set a sort order as an option when performing
155+
update and replace operations in a bulk operation.
156+
152157
For more information about the changes in this version, see the
153158
:github:`v1.21 release notes
154159
</mongodb/mongo-php-library/releases/tag/1.21.0>` on GitHub.

source/write/replace.txt

+4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ table describes some options you can set in the array:
153153
Server manual.
154154
| Defaults to ``false``.
155155

156+
* - ``sort``
157+
- | Specifies the sort order to apply to documents before
158+
performing the replace operation.
159+
156160
* - ``collation``
157161
- | Specifies the kind of language collation to use when sorting
158162
results. For more information, see :manual:`Collation </reference/collation/#std-label-collation>`

source/write/update.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ describes some options you can set in the array:
119119
Server manual.
120120
| Defaults to ``false``.
121121

122+
* - ``sort``
123+
- | Applies to ``updateOne()`` only. Specifies the sort order to
124+
apply to documents before performing the update operation.
125+
122126
* - ``collation``
123127
- | Specifies the kind of language collation to use when sorting
124128
results. For more information, see :manual:`Collation </reference/collation/#std-label-collation>`
@@ -226,4 +230,4 @@ guide, see the following API documentation:
226230

227231
- :phpmethod:`MongoDB\Collection::updateOne()`
228232
- :phpmethod:`MongoDB\Collection::updateMany()`
229-
- :phpclass:`MongoDB\UpdateResult`
233+
- :phpclass:`MongoDB\UpdateResult`

0 commit comments

Comments
 (0)