Commit 2c98016f authored by Jeremy Mikola's avatar Jeremy Mikola

Use reference-style links in Upgrade Guide

parent 9590203b
...@@ -83,7 +83,9 @@ between [updating specific fields][update] and ...@@ -83,7 +83,9 @@ between [updating specific fields][update] and
[MongoDB\Collection][collection] does not yet have a helper method for the [MongoDB\Collection][collection] does not yet have a helper method for the
[group][group] command; however, that is planned in [PHPLIB-177][jira-group]. [group][group] command; however, that is planned in [PHPLIB-177][jira-group].
The following example demonstrates how to execute a group command using The following example demonstrates how to execute a group command using
[Database::command()](classes/database.md#command): [Database::command()][command]:
[command]: classes/database.md#command
```php ```php
<?php <?php
...@@ -108,7 +110,7 @@ $resultDocument = $cursor->toArray()[0]; ...@@ -108,7 +110,7 @@ $resultDocument = $cursor->toArray()[0];
[MongoDB\Collection][collection] does not yet have a helper method for the [MongoDB\Collection][collection] does not yet have a helper method for the
[mapReduce][mapReduce] command; however, that is planned in [mapReduce][mapReduce] command; however, that is planned in
[PHPLIB-53][jira-mapreduce]. The following example demonstrates how to execute a [PHPLIB-53][jira-mapreduce]. The following example demonstrates how to execute a
mapReduce command using [Database::command()](classes/database.md#command): mapReduce command using [Database::command()][command]:
```php ```php
<?php <?php
...@@ -139,8 +141,11 @@ with [DBRef][dbref] objects; however, that is planned in ...@@ -139,8 +141,11 @@ with [DBRef][dbref] objects; however, that is planned in
[MongoCollection::save()][save], which was syntactic sugar for an insert or [MongoCollection::save()][save], which was syntactic sugar for an insert or
upsert operation, has been removed in favor of explicitly using upsert operation, has been removed in favor of explicitly using
[insertOne()](classes/collection.md#insertone) or [insertOne()][insertone] or [replaceOne()][replaceone] (with the "upsert"
[replaceOne()](classes/collection.md#replaceone) (with the "upsert" option). option).
[insertone]: classes/collection.md#insertone
[replaceone]: classes/collection.md#replaceone
![save() flowchart](img/save-flowchart.png) ![save() flowchart](img/save-flowchart.png)
...@@ -155,8 +160,9 @@ dangerous [full-document replacements][replace]. ...@@ -155,8 +160,9 @@ dangerous [full-document replacements][replace].
### MongoWriteBatch ### MongoWriteBatch
The legacy driver's [MongoWriteBatch][batch] classes have been replaced with a The legacy driver's [MongoWriteBatch][batch] classes have been replaced with a
general-purpose [bulkWrite()](classes/collection.md#bulkwrite) method. Whereas general-purpose [bulkWrite()][bulkwrite] method. Whereas the legacy driver only
the legacy driver only allowed bulk operations of the same time, the new method allowed bulk operations of the same time, the new method allows operations to be
allows operations to be mixed (e.g. inserts, updates, and deletes). mixed (e.g. inserts, updates, and deletes).
[batch]: http://php.net/manual/en/class.mongowritebatch.php [batch]: http://php.net/manual/en/class.mongowritebatch.php
[bulkwrite]: classes/collection.md#bulkwrite
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment