Skip to content

Commit 4f8ee22

Browse files
committed
more fixes I noticed
1 parent 6ff4dd5 commit 4f8ee22

File tree

19 files changed

+27
-49
lines changed

19 files changed

+27
-49
lines changed

source/fundamentals/crud/compound-operations.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Compound Operations
77
.. meta::
88
: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.
99

10-
.. default-domain:: mongodb
11-
1210
.. contents:: On this page
1311
:local:
1412
:backlinks: none
@@ -78,12 +76,12 @@ the specified query filter and deletes it. The method returns a
7876

7977
The ``FindOneAndDelete()`` method is an atomic operation, which means it prevents
8078
any other write operations from changing the matching document until it
81-
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
8280
``FindOneAndDelete()`` in that you cannot specify a sort order for the
8381
matched documents.
8482

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

8886
Modify Behavior
8987
~~~~~~~~~~~~~~~
@@ -163,12 +161,12 @@ document.
163161

164162
The ``FindOneAndUpdate()`` method is an atomic operation, which means it prevents
165163
any other write operations from changing the matching document until it
166-
completes. The ``updateOne()`` method is also an atomic operation, but differs from
167-
``FindOneAndUpdate()`` in that you cannot specify a sort order for the
168-
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()``.
169167

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

173171
Modify Behavior
174172
~~~~~~~~~~~~~~~

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Skip Returned Results
77
.. meta::
88
: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.
99

10-
.. default-domain:: mongodb
11-
1210
.. contents:: On this page
1311
:local:
1412
:backlinks: none

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Sort Results
77
.. meta::
88
:description: Learn how to sort query results, handle ties, and apply sorting in aggregation pipelines with the MongoDB Go Driver.
99

10-
.. default-domain:: mongodb
11-
1210
.. contents:: On this page
1311
:local:
1412
:backlinks: none
@@ -286,4 +284,4 @@ guide, see the following API Documentation:
286284
- `FindOneAndDelete() <{+api+}/mongo#Collection.FindOneAndDelete>`__
287285
- `FindOneAndUpdate() <{+api+}/mongo#Collection.FindOneAndUpdate>`__
288286
- `FindOneAndReplace() <{+api+}/mongo#Collection.FindOneAndReplace>`__
289-
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__
287+
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Bulk Operations
77
.. meta::
88
:description: Learn to perform bulk write operations with the MongoDB Go Driver, including inserts, updates, replacements, and deletions, using the bulkWrite() method.
99

10-
.. default-domain:: mongodb
11-
1210
.. contents:: On this page
1311
:local:
1412
:backlinks: none
@@ -789,4 +787,5 @@ see the following API documentation:
789787
- `NewClientUpdateOneModel() <{+api+}/mongo#NewClientUpdateOneModel>`__
790788
- `NewClientUpdateManyModel() <{+api+}/mongo#NewClientUpdateManyModel>`__
791789
- `NewClientDeleteOneModel() <{+api+}/mongo#NewClientDeleteOneModel>`__
792-
- `NewClientDeleteManyModel() <{+api+}/mongo#NewClientDeleteManyModel>`__
790+
- `NewClientDeleteManyModel()
791+
<{+api+}/mongo#NewClientDeleteManyModel>`__

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Delete Documents
55
================
66

77
.. 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.
8+
:description: Learn how to remove documents from collections with the DeleteOne() and DeleteMany() methods in the MongoDB Go Driver, with examples and options.
99

1010
.. contents:: On this page
1111
:local:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +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.
13+
:description: Learn how to insert documents into a MongoDB collection using the InsertOne() and InsertMany() methods, with options to modify their behavior.
1414

1515
.. contents:: On this page
1616
:local:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +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().
13+
:description: Learn how to modify MongoDB documents using update and replace operations, including methods like UpdateOne(), UpdateMany(), and ReplaceOne().
1414

1515
.. contents:: On this page
1616
:local:

source/fundamentals/indexes.txt

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

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

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

source/fundamentals/stable-api.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
.. meta::
88
:description: Learn how to specify Stable API compatibility in the MongoDB Go Driver to ensure operations align with a defined API version.
99

10-
.. default-domain:: mongodb
11-
1210
.. contents:: On this page
1311
:local:
1412
:backlinks: none
@@ -152,4 +150,4 @@ API Documentation:
152150
- `ServerAPIOptions <{+api+}/mongo/options#ServerAPIOptions>`__
153151
- `ServerApiVersion <{+api+}/mongo/options#ServerAPIVersion>`__
154152
- `SetDeprecationErrors() <{+api+}/mongo/options#ServerAPIOptions.SetDeprecationErrors>`__
155-
- `SetStrict() <{+api+}/mongo/options#ServerAPIOptions.SetStrict>`__
153+
- `SetStrict() <{+api+}/mongo/options#ServerAPIOptions.SetStrict>`__

source/quick-reference.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Quick Reference
77
.. meta::
88
: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.
99

10-
.. default-domain:: mongodb
11-
1210
This page shows the driver syntax for several MongoDB commands and links to
1311
their related reference and API documentation.
1412

source/usage-examples/command.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Run a Command Example
77
.. meta::
88
:description: Learn how to execute commands on a MongoDB server using the runCommand() method in Go, with an example retrieving database statistics.
99

10-
.. default-domain:: mongodb
11-
1210
You can run commands directly on your MongoDB server by using the
1311
``RunCommand()`` method.
1412

source/usage-examples/deleteMany.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Delete Multiple Documents
55
=========================
66

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

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

source/usage-examples/deleteOne.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Delete a Document
55
=================
66

77
.. meta::
8-
:description: Learn how to delete a document from a collection using the deleteOne() method in the MongoDB Go Driver.
8+
:description: Learn how to delete a document from a collection using the DeleteOne() method in the MongoDB Go Driver.
99

1010
You can delete a document in a collection by using the ``DeleteOne()``
1111
method.

source/usage-examples/findOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Find a Document
55
===============
66

77
.. meta::
8-
:description: Retrieve a single document from a collection using the findOne() method in the MongoDB Go Driver.
9-
10-
.. default-domain:: mongodb
8+
:description: Retrieve a single document from a collection using the FindOne() method in the MongoDB Go Driver.
119

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

source/usage-examples/insertMany.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Insert Multiple Documents
55
=========================
66

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

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

source/usage-examples/insertOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Insert a Document Example
55
=========================
66

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

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

source/usage-examples/replaceOne.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ Replace a Document
55
==================
66

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

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

source/usage-examples/updateOne.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Update a Document
55
=================
66

77
.. meta::
8-
:description: Learn how to update a document in a collection using the updateOne() method in the MongoDB Go Driver.
8+
:description: Learn how to update a document in a collection using the UpdateOne() method in the MongoDB Go Driver.
99

1010
You can update a document in a collection by using the ``UpdateOne()``
1111
method.

source/whats-new.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ What's New in 2.1
8686
The 2.1 {+driver-short+} release includes the following improvements
8787
and fixes:
8888

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

94-
- Introduces the new `bson.Vector <{+api+}/bson#Vector>`__ type to make inserting and querying
94+
- Introduces the `bson.Vector <{+api+}/bson#Vector>`__ type to make inserting and querying
9595
vector data by using :atlas:`Atlas Vector Search </atlas-vector-search/vector-search-overview/>`
9696
easier and more efficient. For an example using the ``bson.Vector`` type, see
9797
the {+driver-short+}'s :ref:`Atlas Vector Search <golang-atlas-vector-search>` guide.
@@ -101,8 +101,9 @@ and fixes:
101101
the server during the lifetime of operation execution.
102102

103103
- Adds the ``sort`` option to `UpdateOneOptions <{+api+}/mongo/options#UpdateOneOptions>`__
104-
and `ReplaceOptions <{+api+}/mongo/options#ReplaceOptions>`__ for the ``updateOne``
105-
and ``replaceOne`` operations.
104+
and `ReplaceOptions <{+api+}/mongo/options#ReplaceOptions>`__ for
105+
``UpdateOne()`` and ``ReplaceOne()`` operations and update and replace
106+
operations in bulk operations.
106107

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

0 commit comments

Comments
 (0)