Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/fundamentals/aggregation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ The aggregation pipeline contains the following stages:
``genre_interests`` field into a new document.
- A ``$group`` stage to group documents by the value of the
``genre_interests`` field. This stage finds the average, minimum, and
maximum user age for users, using the ``$avg``, ``$min``, and ``$max``
operators, respectively.
maximum user age by using the ``$avg``, ``$min``, and ``$max`` operators.

.. io-code-block::

Expand Down
12 changes: 6 additions & 6 deletions source/fundamentals/connections/connection-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ connected to the server.
* - **authMechanismProperties**
- String
- None
- Specifies additional properties for the authentication mechanism
- Specifies more properties for the authentication mechanism
set in the ``authMechanism`` option.

* - **authSource**
Expand Down Expand Up @@ -72,7 +72,7 @@ connected to the server.
* - **heartbeatFrequencyMS**
- Integer greater than or equal to 500
- ``10000`` (10 seconds)
- Specifies the amount of time, in milliseconds, that each
- Specifies the amount of time in milliseconds that each
monitoring thread waits between performing server checks.

* - **journal**
Expand All @@ -83,8 +83,8 @@ connected to the server.
* - **localThresholdMS**
- Non-negative integer
- 15
- | Specifies how much longer, in milliseconds, that the average
round-trip time between the driver and server can take
- | Specifies the amount of time in milliseconds that the average
round-trip time between the driver and server can last
compared to the shortest round-trip time of all the suitable servers.
| A value of ``0`` indicates that there is no latency window, so
only the server with the lowest average round-trip time is
Expand All @@ -93,7 +93,7 @@ connected to the server.
* - **maxIdleTimeMS**
- Non-negative integer
- 0
- | Specifies the amount of time, in milliseconds, that a connection
- | Specifies the amount of time in milliseconds that a connection
can remain idle in a connection pool the server closes it.
| A value of ``0`` indicates that the client does not close idle
connections.
Expand Down Expand Up @@ -157,7 +157,7 @@ connected to the server.
* - **serverSelectionTimeoutMS**
- Non-negative integer
- ``30000`` (30 seconds)
- Specifies the amount of time, in milliseconds, that the
- Specifies the amount of time in milliseconds that the
``Client`` instance waits when attempting to select a server for an
operation before timing out.

Expand Down
8 changes: 4 additions & 4 deletions source/fundamentals/crud/compound-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The following table describes the options available in
- Description

* - ``max_time``
- | The maximum amount of time, in milliseconds, that the query can
- | The maximum amount of time in milliseconds that the query can
run.
|
| Type: ``Duration``
Expand Down Expand Up @@ -265,7 +265,7 @@ The following table describes the options available in
| Default: ``false``

* - ``max_time``
- | The maximum amount of time, in milliseconds, that the query can
- | The maximum amount of time in milliseconds that the query can
run.
|
| Type: ``Duration``
Expand Down Expand Up @@ -396,7 +396,7 @@ Find and Replace a Document

The ``find_one_and_replace()`` method finds and replaces the first
document that matches the specified query filter. The operation replaces
all of the fields of the document except the ``_id`` field with fields
all the fields of the document except the ``_id`` field with fields
and values that you provide. If a document matches the filter criteria,
the method returns a ``Some`` type. If no documents match, it returns a
``None`` type.
Expand Down Expand Up @@ -434,7 +434,7 @@ The following table describes the options available in
| Default: ``false``

* - ``max_time``
- | The maximum amount of time, in milliseconds, that the query can
- | The maximum amount of time in milliseconds that the query can
run.
|
| Type: ``Duration``
Expand Down
4 changes: 2 additions & 2 deletions source/fundamentals/crud/read-operations/query.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Sample Data

The examples in this guide use the following sample documents. Each
document represents a fruit in a store's inventory and contains
information about its quantity. Some documents contain additional fields
information about its quantity. Some documents contain fields
that describe the fruit or its vendors.

.. literalinclude:: /includes/fundamentals/code-snippets/crud/query.rs
Expand Down Expand Up @@ -226,7 +226,7 @@ divisible by ``3``:
.. note::

If a query filter contains a literal value query with multiple field-value pairs,
the driver matches documents that meet all of the criteria.
the driver matches documents that meet all the criteria.

For example, the following queries produce equivalent results:

Expand Down
11 changes: 2 additions & 9 deletions source/fundamentals/crud/read-operations/retrieve.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,10 @@ Find Operations
Use find operations to retrieve data from MongoDB. Find operations
consist of the ``find()`` and ``find_one()`` methods.

You can also run find operations after starting a session with the
``find_with_session()`` and ``find_one_with_session()`` methods. Both methods
take an additional ``ClientSession`` parameter, or a logical session used for
ordering sequential operations. To learn more about these two methods, see the
API documentation for `find_with_session() <{+api+}/struct.Collection.html#method.find_with_session>`__
and `find_one_with_session() <{+api+}/struct.Collection.html#method.find_one_with_session>`__.

Find All Matching Documents
~~~~~~~~~~~~~~~~~~~~~~~~~~~

To find *all of the documents* that match your criteria, use the
To find *all the documents* that match your criteria, use the
``find()`` method. This method takes a query filter as a parameter. A
query filter consists of the fields and values that form criteria for
documents to match.
Expand Down Expand Up @@ -281,7 +274,7 @@ To learn more about aggregations and view aggregation examples, see the :ref:`ru
The method returns the resulting documents in a ``Cursor`` type. If
your aggregation pipeline does not contain a :manual:`$match
</reference/operator/aggregation/match/>` stage, the pipeline processes
all of the documents in the collection.
all the documents in the collection.

Modify Aggregation Behavior
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions source/fundamentals/crud/write-operations/delete.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ following parameters:

.. note::

If the preceding example used the ``delete_one()`` method instead of
``delete_many()`` for the delete operation, the driver would delete
the first of the two documents that matched the query filter.
If you use the ``delete_one()`` method instead of
``delete_many()`` in the preceding code example, the driver deletes
only the first of the two documents that match the query filter.

.. _rust-crud-del-addtl-info:

Expand Down
4 changes: 2 additions & 2 deletions source/fundamentals/database-collection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ the ``list_database_names()`` method:
Drop a Database
---------------

Dropping a database permanently deletes all of the data in that database's
Dropping a database permanently deletes all the data in that database's
collections. To drop a database, call the `drop()
<{+api+}/struct.Database.html#method.drop>`__ method
on your ``Database`` instance. The following code shows
Expand Down Expand Up @@ -256,7 +256,7 @@ a database referenced by the ``db`` variable by using the
Drop a Collection
-----------------

Dropping a collection permanently deletes all of the data in that
Dropping a collection permanently deletes all the data in that
collection. To drop a collection, call the `drop()
<{+api+}/struct.Collection.html#method.drop>`__ method
on your ``Collection`` instance. The following code shows
Expand Down
4 changes: 2 additions & 2 deletions source/fundamentals/enterprise-auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ authentication mechanism by using the following placeholders:

Because your credentials are stored outside of MongoDB, you must use the
``$external`` database for authentication. The ``source`` field of
the ``Credential`` struct defaults to ``$external``, so you do
not need to explicitly set this field.
the ``Credential`` struct defaults to ``$external``, so you can omit
this field.

Alternatively, you can authenticate by using a connection string URI by
setting the value of the ``authMechanism`` connection string option to ``PLAIN``.
Expand Down
2 changes: 1 addition & 1 deletion source/fundamentals/stable-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ are compatible with that version.

.. note::

The {+driver-long+} currently supports only {+stable-api+} version 1.
The {+driver-long+} supports only {+stable-api+} version 1.

API Version Specification Example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
14 changes: 6 additions & 8 deletions source/fundamentals/tracing-logging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ In this guide, you can learn how to use the {+driver-short+} to configure
**tracing** and **logging** for your application. Tracing and logging
are two frameworks for observing your application. Logging allows you to
view a discrete, event-based log of driver activities, while tracing
provides a continuous view. Logs might help you identify an issue in
your application, while a trace might help you locate the reason for the
issue.
provides a continuous view.

In the {+driver-short+}, the functionalities of tracing and logging do not
differ greatly. However, when you enable tracing, the driver emits messages in a
more structured format, which can make it easier for your application to
more structured format, which can make it more convenient for your application to
consume event messages programmatically.

Tracers and loggers log messages at a severity, or verbosity, level that you
can specify. By enabling one of these components in your application,
you can receive information about your application's activities at a
high level, a detailed level, or somewhere in between.
you can receive information about your application's activities at
different levels of detail.

.. tip::

Expand Down Expand Up @@ -90,8 +88,8 @@ against and their corresponding targets:
To specify the logging component and severity level, you can set the
``RUST_LOG`` environment variable when you compile and run your
application. Specify the logging component by setting the value of
``RUST_LOG`` to one of the targets provided in the preceding table,
along with a severity level.
``RUST_LOG`` to one of the targets provided in the preceding table and
including a severity level.

The following code shows a command to execute a program that records
connection events at the ``debug`` level:
Expand Down
2 changes: 1 addition & 1 deletion source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Issues & Help
-------------

Learn how to report bugs, contribute to the driver, and find
additional resources for asking questions in the
more resources for asking questions in the
:ref:`rust-issues-and-help` section.

Compatibility
Expand Down
6 changes: 3 additions & 3 deletions source/issues-and-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ with varying levels of experience using the {+driver-short+}. The
quickest way to get support for general questions is through the
`MongoDB Community Forums <https://www.mongodb.com/community/forums/>`_.

To learn more, refer to the `support channels
To learn more, visit the `support channels
<http://www.mongodb.org/about/support>`_.

Bugs / Feature Requests
Expand Down Expand Up @@ -40,8 +40,8 @@ Pull Requests
We are happy to accept contributions to help improve the
{+driver-short+}. We guide user contributions to ensure they meet
the standards of the codebase. Please ensure that any pull requests
include documentation, tests, and pass the integration and unit tests in
the source code.
include documentation and tests, and confirm that they pass the
integration and unit tests in the source code.

To get started, clone the {+driver-short+} repository and create a
feature branch with the following shell commands:
Expand Down
6 changes: 3 additions & 3 deletions source/quick-start/connect-to-mongodb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Connect to MongoDB

cargo run

You should see the details of the retrieved movie document in the
command line output:
The command line output contains details about the retrieved movie
document:

.. code-block:: none
:copyable: false
Expand Down Expand Up @@ -85,7 +85,7 @@ Connect to MongoDB
proper connection string in the ``main.rs`` file and that you loaded the
sample data.

After you complete these steps, you should have a working application that
After you complete these steps, you have a working application that
uses the driver to connect to your MongoDB deployment, runs a query on
the sample data, and prints out the result.

Expand Down
2 changes: 1 addition & 1 deletion source/quick-start/create-a-connection-string.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To connect to an instance or deployment not hosted on Atlas, see

Save this file to a safe location for use in the next step.

After completing these steps, you should have a connection string that
After completing these steps, you have a connection string that
contains your database username and password.

.. include:: /includes/quick-start/troubleshoot.rst
Expand Down
4 changes: 2 additions & 2 deletions source/quick-start/create-a-deployment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ your MongoDB database in the cloud.
After you create your database user, save that user's
username and password to a safe location for use in an upcoming step.

After you complete these steps, you should have a new free tier MongoDB
After you complete these steps, you have a new free tier MongoDB
deployment on Atlas, database user credentials, and sample data loaded
in your database.
into your database.

.. include:: /includes/quick-start/troubleshoot.rst

Expand Down
8 changes: 4 additions & 4 deletions source/quick-start/download-and-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Download and Install

cargo new rust_quickstart

When this command successfully completes, you should have a ``Cargo.toml``
When this command successfully completes, you have a ``Cargo.toml``
file and a ``src`` directory with a ``main.rs`` file in your
``rust_quickstart`` directory.

Expand All @@ -54,8 +54,8 @@ Download and Install
.. tip::

The ``mongodb`` crate resolves the ``bson`` crate, which is the primary
MongoDB data representation crate. You do not need to add the ``bson``
crate to your dependencies list.
MongoDB data representation crate. You can omit the ``bson``
crate in your dependencies list.

The driver supports both asynchronous and synchronous runtimes.
To see example dependency lists for each runtime, select
Expand Down Expand Up @@ -100,7 +100,7 @@ Download and Install
To learn more about asynchronous and synchronous runtimes, see the :ref:`rust-runtimes`
guide.

After you complete these steps, you should have Rust and Cargo installed
After you complete these steps, you have Rust and Cargo installed
and a new Rust project with the necessary driver dependencies.

.. include:: /includes/quick-start/troubleshoot.rst
Expand Down