Skip to content

Commit af2130a

Browse files
authored
Merge pull request #452 from mongodb/jmikola-patch-1
Revise group() and mapReduce() info in upgrade guide
2 parents 29cf550 + 3b789a7 commit af2130a

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

source/upgrade.txt

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ Old and New Methods
109109
- Not implemented.
110110

111111
* - :php:`MongoCollection::group() <mongocollection.group>`
112-
- Not yet implemented. See :issue:`PHPLIB-177`.
113-
Use :phpmethod:`MongoDB\\Database::command()`.
112+
- Not implemented. Use :phpmethod:`MongoDB\\Database::command()`.
114113

115114
* - :php:`MongoCollection::insert() <mongocollection.insert>`
116115
- :phpmethod:`MongoDB\\Collection::insertOne()`
@@ -156,10 +155,10 @@ also split to distinguish between :manual:`updating specific fields
156155
Group Command Helper
157156
--------------------
158157

159-
:phpclass:`MongoDB\\Collection` does not yet have a helper method for the
160-
:manual:`group </reference/command/group>` command; however, it is planned in
161-
:issue:`PHPLIB-177`. The following example demonstrates how to execute a group
162-
command using the :phpmethod:`MongoDB\\Database::command()` method:
158+
:phpclass:`MongoDB\\Collection` does have a helper method for the
159+
:manual:`group </reference/command/group>` command; The following example
160+
demonstrates how to execute a group command using the
161+
:phpmethod:`MongoDB\\Database::command()` method:
163162

164163
.. code-block:: php
165164

@@ -177,28 +176,6 @@ command using the :phpmethod:`MongoDB\\Database::command()` method:
177176

178177
$resultDocument = $cursor->toArray()[0];
179178

180-
MapReduce Command Helper
181-
------------------------
182-
183-
:phpclass:`MongoDB\\Collection` does not yet have a helper method for the
184-
:manual:`mapReduce </reference/command/mapReduce>` command; however, that is
185-
planned in :issue:`PHPLIB-53`. The following example demonstrates how to execute
186-
a mapReduce command using the :phpmethod:`MongoDB\\Database::command()` method:
187-
188-
.. code-block:: php
189-
190-
<?php
191-
192-
$database = (new MongoDB\Client)->selectDatabase('db_name');
193-
$cursor = $database->command([
194-
'mapReduce' => 'collection_name',
195-
'map' => new MongoDB\BSON\Javascript('...'),
196-
'reduce' => new MongoDB\BSON\Javascript('...'),
197-
'out' => 'output_collection_name',
198-
]);
199-
200-
$resultDocument = $cursor->toArray()[0];
201-
202179
DBRef Helpers
203180
-------------
204181

0 commit comments

Comments
 (0)