Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
a9cf06b9
Unverified
Commit
a9cf06b9
authored
Jan 02, 2018
by
Jeremy Mikola
Committed by
GitHub
Jan 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revise group() and mapReduce() info in upgrade guide
parent
d56f01d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
28 deletions
+5
-28
upgrade.txt
docs/upgrade.txt
+5
-28
No files found.
docs/upgrade.txt
View file @
a9cf06b9
...
...
@@ -109,8 +109,7 @@ Old and New Methods
- Not implemented.
* - :php:`MongoCollection::group() <mongocollection.group>`
- Not yet implemented. See :issue:`PHPLIB-177`.
Use :phpmethod:`MongoDB\\Database::command()`.
- Not implemented. Use :phpmethod:`MongoDB\\Database::command()`.
* - :php:`MongoCollection::insert() <mongocollection.insert>`
- :phpmethod:`MongoDB\\Collection::insertOne()`
...
...
@@ -156,10 +155,10 @@ also split to distinguish between :manual:`updating specific fields
Group Command Helper
--------------------
:phpclass:`MongoDB\\Collection` does
not yet
have a helper method for the
:manual:`group </reference/command/group>` command;
however, it is planned in
:issue:`PHPLIB-177`. The following example demonstrates how to execute a group
command using the
:phpmethod:`MongoDB\\Database::command()` method:
:phpclass:`MongoDB\\Collection` does have a helper method for the
:manual:`group </reference/command/group>` command;
The following example
demonstrates how to execute a group command using the
:phpmethod:`MongoDB\\Database::command()` method:
.. code-block:: php
...
...
@@ -177,28 +176,6 @@ command using the :phpmethod:`MongoDB\\Database::command()` method:
$resultDocument = $cursor->toArray()[0];
MapReduce Command Helper
------------------------
:phpclass:`MongoDB\\Collection` does not yet have a helper method for the
:manual:`mapReduce </reference/command/mapReduce>` command; however, that is
planned in :issue:`PHPLIB-53`. The following example demonstrates how to execute
a mapReduce command using the :phpmethod:`MongoDB\\Database::command()` method:
.. code-block:: php
<?php
$database = (new MongoDB\Client)->selectDatabase('db_name');
$cursor = $database->command([
'mapReduce' => 'collection_name',
'map' => new MongoDB\BSON\Javascript('...'),
'reduce' => new MongoDB\BSON\Javascript('...'),
'out' => 'output_collection_name',
]);
$resultDocument = $cursor->toArray()[0];
DBRef Helpers
-------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment