Skip to content

Commit 6286ca9

Browse files
authored
DOCSP-49868 - MongoUrl (#629)
1 parent 8b08829 commit 6286ca9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2319
-515
lines changed

config/intersphinx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Weirdly, giza wants a non-empty list of two or more, so we have to include extraneous/unused one --hence the python
1+
# Weirdly, giza wants a non-empty list of two or more, so we must include extraneous/unused one --hence the python
22
name: python
33
url: https://docs.python.org/2/
44
path: python2.inv

source/atlas-search.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Use the ``Compound()`` method to combine two or more operators into a single
122122
search.
123123

124124
The following example searches the ``guitars`` collection for any documents
125-
that match all of the following criteria:
125+
that match all the following criteria:
126126

127127
- The ``rating`` field exists on the document
128128
- The ``in_stock`` field is not ``false``

source/connect/connection-options.txt

Lines changed: 1317 additions & 414 deletions
Large diffs are not rendered by default.

source/connect/connection-options/stable-api.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
:depth: 2
1313
:class: singlecol
1414

15-
.. note::
16-
17-
The {+stable-api+} feature requires {+mdb-server+} 5.0 or later.
18-
19-
You should use the {+stable-api+} feature only if all of the MongoDB
20-
servers you're connecting to support this feature.
21-
2215
Overview
2316
--------
2417

@@ -46,10 +39,10 @@ version of the {+stable-api+}.
4639
.. tip::
4740

4841
Once you've created a ``MongoClient``, you can't change its {+stable-api+} version.
49-
If you need to run commands using more than one version of the
42+
If you must run commands using more than one version of the
5043
{+stable-api+}, instantiate a separate client with that version.
5144

52-
If you need to run commands not covered by the {+stable-api+}, make sure the
45+
If you must run commands not covered by the {+stable-api+}, make sure the
5346
"strict" option is disabled. See the section on
5447
:ref:`{+stable-api+} Options <stable-api-options>` for more information.
5548

source/connect/connection-troubleshooting.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ You can also set configuration settings by creating a ``MongoClientSettings``
168168
object and passing that to the ``MongoClient`` constructor. You can use the
169169
``Credential`` property to set the login credentials including specifying the
170170
authentication database. For more information about using ``MongoClientSettings``
171-
as well as some examples, see
171+
and to see some examples, see
172172
:ref:`Using MongoClientSettings <csharp-mongo-client-settings>`.
173173

174174
You can check if this is the issue by attempting to connect to a MongoDB
@@ -249,7 +249,7 @@ The following section describes a method that may help resolve the issue.
249249
Check the Number of Connections
250250
-------------------------------
251251

252-
If you need to create more open connections, increase ``MaxConnectionPoolSize``. For more
252+
If you must create more open connections, increase ``MaxConnectionPoolSize``. For more
253253
information about checking the number of connections, see
254254
:ref:`Check the Number of Connections <csharp-troubleshooting-connection-number-connections>`
255255
in the Error Sending Message section.
@@ -279,7 +279,7 @@ time the driver spends attempting to establish the connection by using the
279279
:manual:`Timeout Options </reference/connection-string/#timeout-options>` in
280280
the Server manual.
281281

282-
You should ensure the ``connectTimeoutMS`` setting is not lower than
282+
Ensure the ``connectTimeoutMS`` setting is not lower than
283283
the highest network latency you have to a member of the set. If one of the
284284
secondary members has a latency of 10000 milliseconds, setting the
285285
``connectTimeoutMS`` to 9000 prevents the driver from ever connecting to that
@@ -301,7 +301,7 @@ You can set this option on the connection string. The following example sets
301301

302302
You can also set configuration settings by creating a ``MongoClientSettings``
303303
object and passing that to the ``MongoClient`` constructor. For more information
304-
about using ``MongoClientSettings`` as well as some examples, see
304+
about using ``MongoClientSettings`` and to see some examples, see
305305
:ref:`Using MongoClientSettings <csharp-mongo-client-settings>`.
306306

307307
Check the Number of Connections

source/connect/mongoclient.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,15 @@ connection URI to connect to a MongoDB deployment running on port ``27017`` of `
9797
const string uri = "mongodb://localhost:27017/";
9898
var client = new MongoClient(uri);
9999

100-
Configure the MongoClient
101-
-------------------------
100+
Configure the Connection
101+
------------------------
102102

103-
You can configure settings for the ``MongoClient`` object by passing a
104-
``MongoClientSettings`` object to the constructor. The following example creates a
105-
``MongoClient`` object and sets the ``UseTls`` property to ``true``:
103+
You can configure your connection in the following ways:
106104

107-
.. code-block:: csharp
108-
109-
var connectionString = "mongodb://localhost:27017/"
110-
var settings = MongoClientSettings.FromConnectionString(connectionString);
111-
settings.UseTls = true;
105+
- Specifying parameters in the connection URI
106+
- Specifying settings on a ``MongoClientSettings`` or ``MongoUrlBuilder`` object
112107

113-
To view a full list of the settings you can configure, see the
108+
To learn more about configuring your connection, see the
114109
:ref:`csharp-connection-options` guide.
115110

116111
API Documentation

source/crud/gridfs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ code.
690690
.. note:: File Revisions
691691

692692
The ``Delete()`` and ``DeleteAsync()`` methods support deleting only one file at a time.
693-
If you want to delete each file revision, or files with different upload
693+
To delete each file revision, or files with different upload
694694
times that share the same file name, collect the ``_id`` values of each revision.
695695
Then, pass each ``_id`` value in separate calls to the ``Delete()`` or ``DeleteAsync()``
696696
method.

source/crud/insert.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,8 @@ Assume you want to insert the following documents:
248248

249249
If you attempt to insert these documents with default
250250
``InsertManyOptions``, the driver throws a ``MongoBulkWriteException`` at the third
251-
document because of the repeated ``_id`` value, but the documents before
252-
the error-producing document are still inserted into your collection.
253-
254-
If you look inside your collection, you should be able to see the following documents:
251+
document because of the repeated ``_id`` value. The operation adds only the first two documents
252+
to the collection:
255253

256254
.. code-block:: json
257255
:copyable: false
@@ -262,9 +260,7 @@ If you look inside your collection, you should be able to see the following docu
262260
If you set ``IsOrdered`` to ``false`` in your insert operation, the driver will
263261
continue to insert your documents even if some documents produce errors.
264262
With this modified insert behavior, the driver throws an exception but inserts all documents
265-
that do not produce errors.
266-
267-
If you look inside your collection, you should be able to see the following documents:
263+
that do not produce errors:
268264

269265
.. code-block:: json
270266
:copyable: false

source/crud/query/query-filter.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,12 @@ bitwise operations and the equivalent {+mdb-server+} operators:
586586
- {+mdb-server+} Operator
587587

588588
* - ``BitsAllClear()``
589-
- Matches documents where all of the specified bit positions are clear (``0``) in
589+
- Matches documents where all the specified bit positions are clear (``0``) in
590590
the specified field.
591591
- :manual:`$bitsAllClear </reference/operator/query/bitsAllClear/>`
592592

593593
* - ``BitsAllSet()``
594-
- Matches documents where all of the specified bit positions are set (``1``) in
594+
- Matches documents where all the specified bit positions are set (``1``) in
595595
the specified field.
596596
- :manual:`$bitsAllSet </reference/operator/query/bitsAllSet/>`
597597

source/document-formats/bson.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ write to a file, perform the following steps:
9999
#. For each BSON document and subdocument you want to create, call
100100
``WriteStartDocument()``.
101101
#. Within each BSON document and subdocument, call ``WriteName()`` to set the field
102-
name and the appropriate ``Write*`` method to set its value. Each data type has a
103-
dedicated ``Write*`` method that you should use.
102+
name and the appropriate ``Write*`` method to set its value. Use the
103+
dedicated ``Write*`` method that corresponds to each data type.
104104
#. To start and end arrays, use ``WriteStartArray()`` and ``WriteEndArray()``.
105105
#. At the end of each document and subdocument, call ``WriteEndDocument()``.
106106

0 commit comments

Comments
 (0)