Skip to content

Commit ceb06c5

Browse files
committed
DOCSP-49699: compound ops page typo fix (#496)
* DOCSP-49699: compound ops page typo fix * more fixes I noticed * small fix * small fix * vale (cherry picked from commit 16332ab)
1 parent 9c77552 commit ceb06c5

20 files changed

+65
-38
lines changed

source/fundamentals/crud/compound-operations.txt

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compound Operations
55
===================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to perform compound operations in MongoDB using Go, combining read and write actions into a single atomic operation to prevent data alteration.
89

910
.. contents:: On this page
1011
:local:
@@ -75,22 +76,22 @@ the specified query filter and deletes it. The method returns a
7576

7677
The ``FindOneAndDelete()`` method is an atomic operation, which means it prevents
7778
any other write operations from changing the matching document until it
78-
completes. The ``deleteOne()`` method is also an atomic operation, but differs from
79+
completes. The ``DeleteOne()`` method is also an atomic operation, but differs from
7980
``FindOneAndDelete()`` in that you cannot specify a sort order for the
8081
matched documents.
8182

8283
To find a document and delete it in separate operations, call the
83-
``findOne()`` method followed by the ``deleteOne()`` method.
84+
``FindOne()`` method followed by the ``DeleteOne()`` method.
8485

8586
Modify Behavior
8687
~~~~~~~~~~~~~~~
8788

8889
You can modify the behavior of the ``FindOneAndDelete()`` method by
89-
passing in a ``FineOneAndDeleteOptions``. If you don't specify a
90-
``FineOneAndDeleteOptions``, the driver uses the default values for each
90+
passing in a ``FindOneAndDeleteOptions``. If you don't specify a
91+
``FindOneAndDeleteOptions``, the driver uses the default values for each
9192
option.
9293

93-
The ``FineOneAndDeleteOptions`` type allows you to configure options
94+
The ``FindOneAndDeleteOptions`` type allows you to configure options
9495
with the following methods:
9596

9697
.. list-table::
@@ -160,22 +161,22 @@ document.
160161

161162
The ``FindOneAndUpdate()`` method is an atomic operation, which means it prevents
162163
any other write operations from changing the matching document until it
163-
completes. The ``updateOne()`` method is also an atomic operation, but differs from
164-
``FindOneAndUpdate()`` in that you cannot specify a sort order for the
165-
matched documents.
164+
completes. The ``UpdateOne()`` method is also an atomic operation, but differs from
165+
``FindOneAndUpdate()`` because you cannot return the pre-image of the
166+
updated document when using ``UpdateOne()``.
166167

167168
To find a document and update it in separate operations, call
168-
the ``findOne()`` method followed by the ``updateOne()`` method.
169+
the ``FindOne()`` method followed by the ``UpdateOne()`` method.
169170

170171
Modify Behavior
171172
~~~~~~~~~~~~~~~
172173

173174
You can modify the behavior of the ``FindOneAndUpdate()`` method by
174-
passing in a ``FineOneAndUpdateOptions``. If you don't specify a
175-
``FineOneAndUpdateOptions``, the driver uses the default values for each
175+
passing in a ``FindOneAndUpdateOptions``. If you don't specify a
176+
``FindOneAndUpdateOptions``, the driver uses the default values for each
176177
option.
177178

178-
The ``FineOneAndUpdateOptions`` type allows you to configure options
179+
The ``FindOneAndUpdateOptions`` type allows you to configure options
179180
with the following methods:
180181

181182
.. list-table::
@@ -273,11 +274,11 @@ Modify Behavior
273274
~~~~~~~~~~~~~~~
274275

275276
You can modify the behavior of the ``FindOneAndReplace()`` method by
276-
passing in a ``FineOneAndReplaceOptions``. If you don't specify a
277-
``FineOneAndReplaceOptions``, the driver uses the default values for each
277+
passing in a ``FindOneAndReplaceOptions``. If you don't specify a
278+
``FindOneAndReplaceOptions``, the driver uses the default values for each
278279
option.
279280

280-
The ``FineOneAndReplaceOptions`` type allows you to configure options
281+
The ``FindOneAndReplaceOptions`` type allows you to configure options
281282
with the following methods:
282283

283284
.. list-table::

source/fundamentals/crud/read-operations/skip.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Skip Returned Results
55
=====================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to skip a specified number of results in MongoDB read operations using the setSkip() method or the $skip stage in aggregation pipelines.
89

910
.. contents:: On this page
1011
:local:

source/fundamentals/crud/read-operations/sort.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Sort Results
55
============
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to sort query results, handle ties, and apply sorting in aggregation pipelines with the MongoDB Go Driver.
89

910
.. contents:: On this page
1011
:local:
@@ -283,4 +284,4 @@ guide, see the following API Documentation:
283284
- `FindOneAndDelete() <{+api+}/mongo#Collection.FindOneAndDelete>`__
284285
- `FindOneAndUpdate() <{+api+}/mongo#Collection.FindOneAndUpdate>`__
285286
- `FindOneAndReplace() <{+api+}/mongo#Collection.FindOneAndReplace>`__
286-
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__
287+
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__

source/fundamentals/crud/write-operations/bulk.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Bulk Operations
55
===============
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn to perform bulk write operations with the MongoDB Go Driver, including inserts, updates, replacements, and deletions, using the bulkWrite() method.
89

910
.. contents:: On this page
1011
:local:
@@ -786,4 +787,5 @@ see the following API documentation:
786787
- `NewClientUpdateOneModel() <{+api+}/mongo#NewClientUpdateOneModel>`__
787788
- `NewClientUpdateManyModel() <{+api+}/mongo#NewClientUpdateManyModel>`__
788789
- `NewClientDeleteOneModel() <{+api+}/mongo#NewClientDeleteOneModel>`__
789-
- `NewClientDeleteManyModel() <{+api+}/mongo#NewClientDeleteManyModel>`__
790+
- `NewClientDeleteManyModel()
791+
<{+api+}/mongo#NewClientDeleteManyModel>`__

source/fundamentals/crud/write-operations/delete.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Delete Documents
55
================
66

7+
.. meta::
8+
:description: Learn how to remove documents from collections with the DeleteOne() and DeleteMany() methods in the MongoDB Go Driver, with examples and options.
9+
710
.. contents:: On this page
811
:local:
912
:backlinks: none

source/fundamentals/crud/write-operations/insert.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Insert a Document
1010

1111
.. meta::
1212
:keywords: code example, write operation, add data
13+
:description: Learn how to insert documents into a MongoDB collection using the InsertOne() and InsertMany() methods, with options to modify their behavior.
1314

1415
.. contents:: On this page
1516
:local:

source/fundamentals/crud/write-operations/modify.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Modify Documents
1010

1111
.. meta::
1212
:keywords: code example, write operation, change data
13+
:description: Learn how to modify MongoDB documents using update and replace operations, including methods like UpdateOne(), UpdateMany(), and ReplaceOne().
1314

1415
.. contents:: On this page
1516
:local:

source/fundamentals/indexes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ results directly from the index, also called a **covered query**.
8585
- ``name`` ascending, ``age`` descending
8686
- ``name`` descending, ``age`` ascending
8787

88-
Specifying a sort order of ``name`` and :guilabel:`age` ascending or :guilabel:`name` and ``age``
89-
descending requires an in-memory sort.
88+
However, specifying a sort order of both fields in the same
89+
direction requires an in-memory sort.
9090

9191
To learn how to ensure your index covers your query criteria and
9292
projection, see :manual:`Query Coverage

source/fundamentals/stable-api.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
{+stable-api+}
55
==============
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to specify Stable API compatibility in the MongoDB Go Driver to ensure operations align with a defined API version.
89

910
.. contents:: On this page
1011
:local:
@@ -149,4 +150,4 @@ API Documentation:
149150
- `ServerAPIOptions <{+api+}/mongo/options#ServerAPIOptions>`__
150151
- `ServerApiVersion <{+api+}/mongo/options#ServerAPIVersion>`__
151152
- `SetDeprecationErrors() <{+api+}/mongo/options#ServerAPIOptions.SetDeprecationErrors>`__
152-
- `SetStrict() <{+api+}/mongo/options#ServerAPIOptions.SetStrict>`__
153+
- `SetStrict() <{+api+}/mongo/options#ServerAPIOptions.SetStrict>`__

source/quick-reference.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Quick Reference
55
===============
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Explore with the MongoDB Go Driver syntax for various commands, including find, insert, update, delete, and more, with links to API documentation and usage examples.
89

910
This page shows the driver syntax for several MongoDB commands and links to
1011
their related reference and API documentation.

source/usage-examples/command.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Run a Command Example
55
=====================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to execute commands on a MongoDB server using the runCommand() method in Go, with an example retrieving database statistics.
89

910
You can run commands directly on your MongoDB server by using the
1011
``RunCommand()`` method.

source/usage-examples/deleteMany.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Delete Multiple Documents
55
=========================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to delete multiple documents from a collection using the DeleteMany() method in the MongoDB Go Driver.
89

910
You can delete multiple documents in a collection by using the
1011
``DeleteMany()`` method.

source/usage-examples/deleteOne.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Delete a Document
55
=================
66

7+
.. meta::
8+
:description: Learn how to delete a document from a collection using the DeleteOne() method in the MongoDB Go Driver.
9+
710
You can delete a document in a collection by using the ``DeleteOne()``
811
method.
912

source/usage-examples/findOne.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Find a Document
55
===============
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Retrieve a single document from a collection using the FindOne() method in the MongoDB Go Driver.
89

910
You can retrieve a single document from a collection by using the
1011
``FindOne()`` method.

source/usage-examples/insertMany.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Insert Multiple Documents
55
=========================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to insert multiple documents into a collection using the InsertMany() method in the MongoDB Go Driver.
89

910
You can insert multiple documents into a collection by using the ``InsertMany()``
1011
method.

source/usage-examples/insertOne.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Insert a Document Example
55
=========================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to insert a document into a collection using the InsertOne() method in the MongoDB Go Driver.
89

910
You can insert a document into a collection by using the ``InsertOne()``
1011
method.

source/usage-examples/replaceOne.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Replace a Document
55
==================
66

7-
.. default-domain:: mongodb
7+
.. meta::
8+
:description: Learn how to replace a document in a MongoDB collection using the ReplaceOne() method with the MongoDB Go Driver.
89

910
You can replace a document in a collection by using the ``ReplaceOne()``
1011
method.

source/usage-examples/updateMany.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Update Multiple Documents
55
=========================
66

7+
.. meta::
8+
:description: Learn how to update multiple documents in a collection using the UpdateMany() method in the MongoDB Go Driver.
9+
710
You can update multiple documents in a collection by using the ``UpdateMany()``
811
method.
912

source/usage-examples/updateOne.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Update a Document
55
=================
66

7+
.. meta::
8+
:description: Learn how to update a document in a collection using the UpdateOne() method in the MongoDB Go Driver.
9+
710
You can update a document in a collection by using the ``UpdateOne()``
811
method.
912

source/whats-new.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@ What's New in 2.1
4545
The 2.1 {+driver-short+} release includes the following improvements
4646
and fixes:
4747

48-
- Introduces the new `Client.BulkWrite <{+api+}/mongo#Client.BulkWrite>`__ method,
48+
- Introduces the `Client.BulkWrite <{+api+}/mongo#Client.BulkWrite>`__ method,
4949
enabling clients to perform multiple insert, update, and delete operations across
5050
multiple databases and collections in a single request. To learn more, see the
5151
:ref:`golang-bulk` guide.
5252

53-
- Introduces the new `bson.Vector <{+api+}/bson#Vector>`__ type to make inserting and querying
53+
- Introduces the `bson.Vector <{+api+}/bson#Vector>`__ type to make inserting and querying
5454
vector data by using :atlas:`Atlas Vector Search </atlas-vector-search/vector-search-overview/>`
55-
easier and more efficient. For an example using the ``bson.Vector`` type, see
56-
the {+driver-short+}'s :ref:`Atlas Vector Search <golang-atlas-vector-search>` guide.
55+
easier and more efficient. To view an example that uses the ``bson.Vector`` type, see
56+
the :ref:`Atlas Vector Search <golang-atlas-vector-search>` guide.
5757

5858
- Extends the `ServerError <{+api+}/mongo#ServerError>`__ interface to include
5959
``ErrorCodes``, which returns a list of deduplicated error codes returned by
6060
the server during the lifetime of operation execution.
6161

6262
- Adds the ``sort`` option to `UpdateOneOptions <{+api+}/mongo/options#UpdateOneOptions>`__
63-
and `ReplaceOptions <{+api+}/mongo/options#ReplaceOptions>`__ for the ``updateOne``
64-
and ``replaceOne`` operations.
63+
and `ReplaceOptions <{+api+}/mongo/options#ReplaceOptions>`__ for
64+
standalone update and replace operations and in bulk operations.
6565

6666
For more information about the changes in this version, see the
6767
:github:`v2.1 release notes </mongodb/mongo-go-driver/releases/tag/v2.1.0>`

0 commit comments

Comments
 (0)