Skip to content

Commit 27d472d

Browse files
mungitoperritojeff-allen-mongo
authored andcommitted
DOCSP-15834 remove methods not available in mongosh
1 parent 165f92e commit 27d472d

37 files changed

+70
-616
lines changed

config/redirects

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,7 @@ raw: /master/release-notes/3.0-general-improvements -> ${base}/release-notes/3.0
15221522
[*-v3.4]: /${version}/reference/operator/aggregation/currentOp -> ${base}/${version}/reference/command/currentOp/
15231523

15241524
# 2.8 compatibility
1525-
#
1525+
15261526
# [*]: /${version}/release-notes/2.8-downgrade -> ${base}/${version}/release-notes/
15271527
# [*]: /${version}/release-notes/2.8-compatibility -> ${base}/${version}/release-notes/
15281528
# [*]: /${version}/release-notes/2.8-changes -> ${base}/${version}/release-notes/
@@ -1799,9 +1799,14 @@ raw: /manual/core/wildcard -> ${base}/manual/core/index-wildcard/
17991799

18001800
[v5.0-*]: /${version}/reference/command/isMaster -> ${base}/${version}/reference/command/hello/
18011801
[v5.0-*]: /${version}/reference/method/db.isMaster -> ${base}/${version}/reference/method/db.hello/
1802+
[v5.0-*]: /${version}/reference/method/db.collection.copyTo.txt -> ${base}/${version}/reference/operator/aggregation/out/
1803+
[v5.0-*]: /${version}/reference/method/db.collection.save.txt -> ${base}/${version}/reference/method/db.collection.insertOne/
18021804
[v5.0-*]: /${version}/reference/method/db.eval -> ${base}/${version}/reference/method/js-database/
18031805
[v5.0-*]: /${version}/reference/method/db.getProfilingLevel -> ${base}/${version}/reference/method/db.getProfilingStatus/
1804-
[v5.0-*]: /${version}/reference/method/Mongo.isCausalConsistency -> ${base}/${version}/core/crud/
1806+
[v5.0-*]: /${version}/reference/method/Mongo.getSecondaryOk -> ${base}/${version}/reference/method/Mongo.getReadPrefMode/
1807+
[v5.0-*]: /${version}/reference/method/Mongo.isCausalConsistency -> ${base}/${version}/core/causal-consistency-read-write-concerns/
1808+
[v5.0-*]: /${version}/reference/method/Mongo.setSecondaryOk -> ${base}/${version}/reference/method/Mongo.setReadPref/
1809+
[v5.0-*]: /${version}/reference/method/rs.secondaryOk.txt -> ${base}/${version}/reference/replica-configuration/
18051810
[v5.0-*]: /${version}/mongo -> ${base}/${version}/reference/mongo/
18061811

18071812
#

source/core/retryable-writes.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.
9393
.. note::
9494

9595
The write operations inside the :doc:`transactions
96-
</core/transactions>` are not individually retryable.
96+
</core/transactions>` are not individually retryable.
9797

9898
.. list-table::
9999
:header-rows: 1
@@ -109,7 +109,6 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.
109109

110110
* - | :method:`db.collection.updateOne()`
111111
| :method:`db.collection.replaceOne()`
112-
| :method:`db.collection.save()`
113112
| :method:`db.collection.update()` where ``multi`` is ``false``
114113

115114
- Single-document update operations. [#duplicate-key-update]_
@@ -165,10 +164,10 @@ cannot be :writeconcern:`{w: 0} <\<number\>>`.
165164
details, see :ref:`update-shard-key`.
166165

167166
.. [#duplicate-key-update]
168-
167+
169168
MongoDB 4.2 will retry certain single-document upserts
170-
(update with ``upsert: true`` and ``multi: false``) that encounter a
171-
duplicate key exception. See :ref:`retryable-update-upsert` for
169+
(update with ``upsert: true`` and ``multi: false``) that encounter a
170+
duplicate key exception. See :ref:`retryable-update-upsert` for
172171
conditions.
173172

174173
Prior to MongoDB 4.2, MongoDB would not retry upsert operations
@@ -207,7 +206,7 @@ the failover period exceeds :urioption:`serverSelectionTimeoutMS`.
207206
Duplicate Key Errors on Upsert
208207
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209208

210-
MongoDB 4.2 will retry single-document upsert operations
209+
MongoDB 4.2 will retry single-document upsert operations
211210
(i.e ``upsert : true`` and ``multi : false``) that
212211
fail due to a duplicate key error *only if* the operation meets
213212
*all* of the following conditions:

source/core/transactions-operations.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ operations against a :red:`non-existing` collection:
134134

135135
- :dbcommand:`insert`
136136

137-
* - :method:`db.collection.save()` results in an insert
138-
-
139-
140137
* - | :method:`db.collection.updateOne()` with ``upsert: true``
141138
| :method:`db.collection.updateMany()` with ``upsert: true``
142139
| :method:`db.collection.replaceOne()` with ``upsert: true``

source/includes/extracts-4.2-changes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,10 @@ content: |
814814
document. In earlier versions, these operations only attempt to
815815
target using the replacement document.
816816
817-
- The :method:`~db.collection.save()` method is deprecated: use the
817+
- The ``save()`` method is deprecated: use the
818818
:method:`~db.collection.insertOne()` or
819819
:method:`~db.collection.replaceOne()` method instead. The
820-
:method:`~db.collection.save()` method cannot be used with
820+
``save()`` method cannot be used with
821821
sharded collections that are *not* sharded by ``_id``, and
822822
attempting to do so will result in an error.
823823

source/includes/fact-getSecondaryOk.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

source/includes/fact-mongosh-callout.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
included in the
55
`MongoDB Server Download
66
<https://www.mongodb.com/try/download/community?tck=docs_server>`__.
7-
For information on the new MongoDB Shell, ``mongosh``, refer to the
8-
:mongosh:`mongosh Documentation </>`.
7+
For information on the new MongoDB Shell (``mongosh``) refer to the
8+
:mongosh:`mongosh documentation </>`.
99

1010
To understand the differences between the two shells, see
1111
:ref:`compare-mongosh-mongo`.

source/includes/fact-secondaryOk.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

source/includes/fact-setSecondaryOk.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

source/includes/table-transactions-operations.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@
8484

8585
:ref:`transactions-operations-ddl`
8686

87-
* - :method:`db.collection.save()`
88-
-
89-
- Starting in MongoDB 4.4, if run on a non-existing
90-
collection, the collection is implicitly created.
91-
92-
In MongoDB 4.2 and earlier, the operation must be run on an
93-
existing collection.
94-
95-
.. seealso::
96-
97-
:ref:`transactions-operations-ddl`
98-
9987
* - | :method:`db.collection.updateOne()`
10088
| :method:`db.collection.updateMany()`
10189
| :method:`db.collection.replaceOne()`

source/reference/command/convertToCapped.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ Example
9999
Convert a Collection
100100
~~~~~~~~~~~~~~~~~~~~
101101

102-
The following example uses a :method:`db.collection.save()` operation to create
102+
The following example uses :method:`db.collection.insertOne()` to create
103103
an ``events`` collection, and :method:`db.collection.stats()` to obtain
104104
information about the collection:
105105

106106
.. code-block:: javascript
107107

108-
db.events.save( { click: 'button-1', time: new Date() } )
108+
db.events.insertOne( { click: 'button-1', time: new Date() } )
109109
db.events.stats()
110110

111111
MongoDB will return the following:

0 commit comments

Comments
 (0)