Skip to content

Commit b15273c

Browse files
Docsp 15981 update node links (#175)
Co-authored-by: kyuan-mongodb <[email protected]>
1 parent 94547eb commit b15273c

24 files changed

+82
-86
lines changed

source/faq.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ What Is the Difference Between "connectTimeoutMS", "socketTimeoutMS" and "maxTim
2929

3030
.. tip::
3131

32-
To modify the allowed time for :node-api:`MongoClient.connect <MongoClient.html#.connect>` to establish a
32+
To modify the allowed time for :node-api-4.0:`MongoClient.connect </classes/mongoclient.html#.connect>` to establish a
3333
connection to a MongoDB server, use the ``serverSelectionTimeoutMS`` option instead.
3434

3535
**Default:** 10000
@@ -39,7 +39,7 @@ What Is the Difference Between "connectTimeoutMS", "socketTimeoutMS" and "maxTim
3939
never time out the socket. This option applies only to sockets that
4040
have already been connected.
4141
* - maxTimeMS
42-
- :node-api:`maxTimeMS </Cursor.html#maxTimeMS>` is the maximum
42+
- :node-api-4.0:`maxTimeMS </classes/findcursor.html#maxtimems>` is the maximum
4343
amount of time the server should wait for an operation to complete
4444
after it has reached the server. If an operation runs over the
4545
specified time limit, it returns a timeout error.

source/fundamentals/collations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ contains the following documents:
284284
Aggregation Example
285285
```````````````````
286286

287-
To use collation with the :node-api:`aggregate </Collection.html#aggregate>`
287+
To use collation with the :node-api-4.0:`aggregate </classes/collection.html#aggregate>`
288288
operation, pass the collation document in the options field, after the
289289
array of pipeline stages.
290290

source/fundamentals/connection.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,5 +313,4 @@ URI to specify the behavior of the client.
313313

314314

315315

316-
For a complete list of options, see the :node-api:`MongoClient
317-
<MongoClient.html>` API reference page.
316+
For a complete list of options, see the :node-api-4.0:`MongoClient </classes/mongoclient.html>` API reference page.

source/fundamentals/crud/compound-operations.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ Built-in Methods
4242

4343
There are three major compound operations:
4444

45-
- :node-api:`findOneAndDelete() </Collection.html#findOneAndDelete>`
45+
- :node-api-4.0:`findOneAndDelete() </classes/collection.html#findoneanddelete>`
4646
matches multiple documents to a supplied query and removes the first
4747
of those matched documents.
4848

49-
- :node-api:`findOneAndUpdate() </Collection.html#findOneAndUpdate>`
49+
- :node-api-4.0:`findOneAndUpdate() </classes/collection.html#findoneandupdate>`
5050
matches multiple documents to a supplied query and updates the first
5151
of those matched documents using the provided update document.
5252

53-
- :node-api:`findOneAndReplace() </Collection.html#findOneAndReplace>`
53+
- :node-api-4.0:`findOneAndReplace() </classes/collection.html#findoneandreplace>`
5454
matches multiple documents to a supplied query and replaces the first
5555
of those matched documents using the provided replacement document.
5656

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

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ Overview
1616
Read operations that return multiple documents do not immediately return
1717
all values matching the query. Because a query can potentially match
1818
very large sets of documents, these operations rely upon an
19-
object called a :node-api:`cursor <Cursor.html>`
20-
that fetches documents in batches to reduce both memory consumption and
21-
network bandwidth usage. Cursors are highly configurable and offer
19+
object called a cursor. A cursor fetches documents in batches to reduce both
20+
memory consumption and network bandwidth usage. Cursors are highly configurable and offer
2221
multiple interaction paradigms for different use cases.
2322

2423
The following functions directly return cursors:
@@ -72,8 +71,7 @@ pulling all matching documents into a collection in process memory.
7271
For Each Functional Iteration
7372
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7473

75-
You can pass a function to the :node-api:`forEach()
76-
<Cursor.html#forEach>` method of any cursor to iterate through
74+
You can pass a function to the :node-api-4.0:`forEach() </classes/findcursor.html#foreach>` method of any cursor to iterate through
7775
results in a functional style:
7876

7977
.. literalinclude:: /code-snippets/crud/cursor.js
@@ -96,9 +94,9 @@ allows you to use cursors in ``for``...``await`` loops:
9694
Manual Iteration
9795
~~~~~~~~~~~~~~~~
9896

99-
You can use the :node-api:`hasNext() <Cursor.html#hasNext>`
97+
You can use the :node-api-4.0:`hasNext() </classes/findcursor.html#hasnext>`
10098
method to check if a cursor can provide additional data, and then use
101-
the :node-api:`next() <Cursor.html#next>`
99+
the :node-api-4.0:`next() </classes/findcursor.html#next>`
102100
method to retrieve the subsequent element of the cursor:
103101

104102
.. literalinclude:: /code-snippets/crud/cursor.js
@@ -132,10 +130,9 @@ Fetch All Documents At Once
132130
~~~~~~~~~~~~~~~~~~~~~~~~~~~
133131

134132
For use cases that require all documents matched by a query to be held
135-
in memory at the same time, use :node-api:`toArray()
136-
<Cursor.html#toArray>`. Note that large sets of
137-
matched documents can cause performance issues or even failures due to
138-
exceeding memory constraints.
133+
in memory at the same time, use :node-api-4.0:`toArray() </classes/findcursor.html#toarray>`.
134+
Note that large sets of matched documents can cause performance issues or even
135+
failures due to exceeding memory constraints.
139136

140137
.. literalinclude:: /code-snippets/crud/cursor.js
141138
:language: javascript
@@ -150,7 +147,7 @@ Count
150147
~~~~~
151148

152149
For an estimated count of the number of documents referenced by the
153-
cursor, use :node-api:`count() <Cursor.html#count>`:
150+
cursor, use :node-api-4.0:`count() </classes/findcursor.html#count>`:
154151

155152
.. literalinclude:: /code-snippets/crud/cursor.js
156153
:language: javascript
@@ -161,7 +158,7 @@ Rewind
161158
~~~~~~
162159

163160
To reset a cursor to its initial position in the set of returned
164-
documents, use :node-api:`rewind() <Cursor.html#rewind>`.
161+
documents, use :node-api-4.0:`rewind() </classes/findcursor.html#rewind>`.
165162

166163
.. literalinclude:: /code-snippets/crud/cursor.js
167164
:language: javascript
@@ -173,7 +170,7 @@ Close
173170

174171
Cursors consume memory and network resources both in the client
175172
application and in the connected instance of MongoDB. Use
176-
:node-api:`close() <Cursor.html#close>`
173+
:node-api-4.0:`close() </classes/findcursor.html#close>`
177174
to free up a cursor's resources in both the client application
178175
and the MongoDB server:
179176

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ calls are equivalent:
9191

9292
For more information on the ``options`` settings for the ``find()``
9393
method, see the
94-
:node-api:`API documentation on find() <Collection.html#find>`.
94+
:node-api-4.0:`API documentation on find() </classes/collection.html#find>`.
9595

9696
Skip
9797
----

source/fundamentals/logging.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,4 @@ The output of the example resembles the following:
222222
}
223223

224224
For more information on the methods available on the ``Logger``, see the
225-
:node-api:`Logger API documentation <Logger.html>`.
225+
:node-api-4.0:`Logger API documentation </classes/logger.html>`.

source/fundamentals/promises.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ a ``catch()`` method to the end of a Promise chain.
9292

9393
Certain methods in the driver such as ``find()`` return a ``Cursor``
9494
instead of a Promise. To determine what type each method returns, refer to
95-
the :node-api:`Node.js API documentation <>`.
95+
the :node-api-4.0:`Node.js API documentation <>`.
9696

9797
Await
9898
~~~~~
@@ -153,7 +153,7 @@ snippet:
153153
);
154154

155155
For more information on the callback method signature for the specific
156-
driver method, see the :node-api:`API documentation <>`.
156+
driver method, see the :node-api-4.0:`API documentation <>`.
157157

158158
.. note::
159159

source/index.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MongoDB Node Driver
1313
/quick-start
1414
/fundamentals
1515
/usage-examples
16-
API Documentation <http://mongodb.github.io/node-mongodb-native/3.6/api/>
16+
API Documentation <https://mongodb.github.io/node-mongodb-native/4.0/>
1717
Release Notes <https://github.com/mongodb/node-mongodb-native/releases/>
1818
View the Source <https://github.com/mongodb/node-mongodb-native/>
1919
/faq
@@ -83,7 +83,7 @@ this section for users that are new to the MongoDB Node.js driver.
8383

8484
API
8585
---
86-
See the :node-api:`API documentation <>` if you are looking for
86+
See the :node-api-4.0:`API documentation <>` if you are looking for
8787
technical information about classes, methods, and configuration objects
8888
within the MongoDB Node.js driver.
8989

source/usage-examples/bulkWrite.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Perform Bulk Operations
99
do not specify one, this method returns a ``Promise`` that resolves to
1010
the result object when it completes. See our guide on :doc:`Promises
1111
and Callbacks </fundamentals/promises>` for more information, or the
12-
:node-api:`API documentation <BulkWriteResult.html>` for information on
12+
:node-api-4.0:`API documentation </classes/bulkwriteresult.html>` for information on
1313
the result object.
1414

1515
The ``bulkWrite()`` method performs batch write operations against a
@@ -33,7 +33,7 @@ The ``bulkWrite()`` method accepts the following parameters:
3333
- ``operations``: specifies the bulk write operations to
3434
perform. Pass each operation to ``bulkWrite()`` as an object in
3535
an array. For examples that show the syntax for each write operation, see
36-
the :node-api:`bulkWrite API documentation <Collection.html#bulkWrite>`.
36+
the :node-api-4.0:`bulkWrite API documentation </classes/collection.html#bulkwrite>`.
3737

3838
- ``options``: *optional* settings that affect the execution
3939
of the operation, such as whether the write operations should execute in

0 commit comments

Comments
 (0)