Skip to content

Commit a538de2

Browse files
author
Chris Cho
authored
DOCSP-10430: update note on promises (#110)
1 parent b7894f4 commit a538de2

File tree

10 files changed

+50
-50
lines changed

10 files changed

+50
-50
lines changed

source/usage-examples/bulkWrite.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Perform Bulk Operations
66

77
.. note::
88
If you specify a callback method, ``bulkWrite()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <BulkWriteResult.html>`.
9+
do not specify one, this method returns a ``Promise`` that resolves to
10+
the result object when it completes. See our guide on :doc:`Promises
11+
and Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <BulkWriteResult.html>` for information on
13+
the result object.
1414

1515
The ``bulkWrite()`` method performs batch write operations against a
1616
*single* collection. This method reduces the number of network round trips from

source/usage-examples/command.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Run a Command
66

77
.. note::
88
If you specify a callback method, ``command()`` returns nothing. If you do
9-
not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Db.html#~resultCallback>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Db.html#~resultCallback>` for
13+
information on the result object.
1414

1515
You can run all raw database operations using the :node-api:`db.command()
1616
<Db.html#~command>` method. Call the ``command()`` method with

source/usage-examples/deleteMany.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Delete Multiple Documents
66

77
.. note::
88
If you specify a callback method, ``deleteMany()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~deleteWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~deleteWriteOpResult>` for
13+
information on the result object.
1414

1515
You can delete several documents in a collection at once using the
1616
:node-api:`collection.deleteMany() <Collection.html#deleteMany>` method.

source/usage-examples/deleteOne.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Delete a Document
66

77
.. note::
88
If you specify a callback method, ``deleteOne()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~deleteWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~deleteWriteOpResult>` for
13+
information on the result object.
1414

1515
You can delete a single document in a collection with
1616
``collection.deleteOne()``.

source/usage-examples/distinct.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Retrieve Distinct Values of a Field
66

77
.. note::
88
If you specify a callback method, ``distinct()`` returns nothing. If you do
9-
not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~resultCallback>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~resultCallback>` for
13+
information on the result object.
1414

1515
You can retrieve a list of distinct values for a field across a
1616
collection by using the :node-api:`collection.distinct()

source/usage-examples/insertMany.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Insert Multiple Documents
66

77
.. note::
88
If you specify a callback method, ``insertMany()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~insertWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~insertWriteOpResult>` for
13+
information on the result object.
1414

1515
You can insert multiple documents using the :node-api:`collection.insertMany()
1616
<Collection.html#insertMany>` method. The ``insertMany()`` takes an array

source/usage-examples/insertOne.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Insert a Document
66

77
.. note::
88
If you specify a callback method, ``insertOne()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~insertOneWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~insertOneWriteOpResult>` for
13+
information on the result object.
1414

1515
You can insert a document into a collection using the
1616
:node-api:`collection.insertOne() <Collection.html#insertOne>` method. To

source/usage-examples/replaceOne.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Replace a Document
66

77
.. note::
88
If you specify a callback method, ``replaceOne()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~updateWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~updateWriteOpResult>` for
13+
information on the result object.
1414

1515
You can replace a single document using the
1616
:node-api:`collection.replaceOne() <Collection.html#replaceOne>` method.

source/usage-examples/updateMany.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Update Multiple Documents
66

77
.. note::
88
If you specify a callback method, ``updateMany()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the :node-api:`updateMany() API
13-
documentation <Collection.html#updateMany>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~resultCallback>` for
13+
information on the result object.
1414

1515
You can update multiple documents using the
1616
:node-api:`updateMany() <Collection.html#updateMany>` method.

source/usage-examples/updateOne.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Update a Document
66

77
.. note::
88
If you specify a callback method, ``updateOne()`` returns nothing. If you
9-
do not specify one, this method returns a
10-
:mdn:`Promise <Web/JavaScript/Reference/Global_Objects/Promise>` that
11-
resolves to the result object when it completes. For more information on
12-
the result object type, see the
13-
:node-api:`API documentation <Collection.html#~updateWriteOpResult>`.
9+
not specify one, this method returns a ``Promise`` that resolves to the
10+
result object when it completes. See our guide on :doc:`Promises and
11+
Callbacks </fundamentals/promises>` for more information, or the
12+
:node-api:`API documentation <Collection.html#~updateWriteOpResult>` for
13+
information on the result object.
1414

1515
You can update a single document using the :node-api:`collection.updateOne()
1616
<Collection.html#updateOne>` method. ``updateOne()`` accepts a filter

0 commit comments

Comments
 (0)