Skip to content

Commit 1360e2b

Browse files
committed
JT small fix (#209)
(cherry picked from commit 27f42bc)
1 parent 47de8a1 commit 1360e2b

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

source/reference/method/MongoDBCollection-bulkWrite.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,15 @@ Behavior
142142
.. include:: /includes/extracts/bulkwriteexception-result.rst
143143
.. include:: /includes/extracts/bulkwriteexception-ordered.rst
144144

145-
.. todo: add output and examples
146-
147145
See Also
148146
--------
149147

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

source/reference/method/MongoDBCollection-replaceOne.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MongoDB\\Collection::replaceOne()
33
=================================
44

5-
.. default-domain:: mongodb
6-
75
.. contents:: On this page
86
:local:
97
:backlinks: none
@@ -90,6 +88,14 @@ Parameters
9088

9189
.. versionadded:: 1.3
9290

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+
9399
* - upsert
94100
- boolean
95101
- If set to ``true``, creates a new document when no document matches the

source/reference/method/MongoDBCollection-updateOne.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MongoDB\\Collection::updateOne()
33
================================
44

5-
.. default-domain:: mongodb
6-
75
.. contents:: On this page
86
:local:
97
:backlinks: none
@@ -95,6 +93,14 @@ Parameters
9593

9694
.. versionadded:: 1.3
9795

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+
98104
* - upsert
99105
- boolean
100106
- If set to ``true``, creates a new document when no document matches the

source/whats-new.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ improvements, and fixes:
5959
- Deprecates the ``flags`` option, used for the deprecated MMAPv1 storage engine.
6060
This option will be removed in {+library-short+} v2.0.
6161

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

source/write/replace.txt

Lines changed: 4 additions & 0 deletions
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

Lines changed: 5 additions & 1 deletion
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)