Skip to content

Commit e402db0

Browse files
committed
edit headings
1 parent 9b06341 commit e402db0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/crud/update/replace.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ Replace Documents
2020
Overview
2121
--------
2222

23-
In this guide, you can learn how to use {+driver-short+} to perform a replace
23+
In this guide, you can learn how to use the {+driver-short+} to perform a replace
2424
operation on a document in a MongoDB collection. A replace operation performs
2525
differently than an update operation. An update operation
26-
modifies only the specified fields in a target document. A replace operation removes *all* fields
27-
in the target document and replaces them with new ones.
26+
modifies only the specified fields in a target document. A replace operation removes all fields in the target document and replaces them with new ones.
2827

2928
Parameters
30-
~~~~~~~~~~
29+
----------
3130

3231
``ReplaceOne()`` expects a **replacement document**, which is the document
3332
that you want to take the place of an existing document. Replacement
@@ -38,7 +37,7 @@ documents use the following format:
3837
bson.D{{"<field>", "<value>"}, {"<field>", "<value>"}, ... }
3938

4039
Return Values
41-
~~~~~~~~~~~~~
40+
-------------
4241

4342
``ReplaceOne()`` returns an ``UpdateResult`` type that
4443
contains information about the replace operation if the operation is
@@ -68,7 +67,7 @@ the method selects and replaces the first matched document. Your replace
6867
operation fails if no documents match the query filter.
6968

7069
Example
71-
~~~~~~~
70+
-------
7271

7372
The following document describes a kitchen item:
7473

0 commit comments

Comments
 (0)