Skip to content

Commit 150d101

Browse files
(DOCSP-13189): Remove deprecated CRUD commands (#79)
* (DOCSP-13189): Remove deprecated CRUD commands (DOCSP-13189): Remove deprecated CRUD commands * Updates per copy review
1 parent 1ea0acd commit 150d101

File tree

5 files changed

+59
-21
lines changed

5 files changed

+59
-21
lines changed

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ Learn More
124124
/logs
125125
/reference
126126
/changelog
127+
/reference/compatibility

source/logs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _mdb-shell-logs:
22

3-
===========================
4-
Retrieve MongoDB Shell Logs
5-
===========================
3+
===================
4+
Retrieve Shell Logs
5+
===================
66

77
.. default-domain:: mongodb
88

source/reference/compatibility.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.. _compatibility:
2+
3+
=================================================
4+
Compatibility Changes with Legacy ``mongo`` Shell
5+
=================================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
The following behaviors in ``mongosh`` affect compatibility with
14+
operations performed in the legacy ``mongo`` shell.
15+
16+
Deprecated Methods
17+
------------------
18+
19+
The following shell methods are deprecated in ``mongosh``. Instead, use
20+
the methods listed in the :guilabel:`Alternative Methods` column.
21+
22+
.. list-table::
23+
:header-rows: 1
24+
:stub-columns: 1
25+
:widths: 10 10
26+
27+
* - Deprecated Method
28+
- Alternative Methods
29+
30+
* - ``db.collection.insert()``
31+
- - :method:`db.collection.insertOne()`
32+
- :method:`db.collection.insertMany()`
33+
- :method:`db.collection.bulkWrite()`
34+
35+
* - ``db.collection.remove()``
36+
- - :method:`db.collection.deleteOne()`
37+
- :method:`db.collection.deleteMany()`
38+
- :method:`db.collection.findOneAndDelete()`
39+
- :method:`db.collection.bulkWrite()`
40+
41+
* - ``db.collection.save()``
42+
- - :method:`db.collection.insertOne()`
43+
- :method:`db.collection.insertMany()`
44+
- :method:`db.collection.updateOne()`
45+
- :method:`db.collection.updateMany()`
46+
- :method:`db.collection.findOneAndUpdate()`
47+
48+
49+
* - ``db.collection.update()``
50+
- - :method:`db.collection.updateOne()`
51+
- :method:`db.collection.updateMany()`
52+
- :method:`db.collection.findOneAndUpdate()`
53+
- :method:`db.collection.bulkWrite()`
54+

source/reference/methods.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,6 @@ Collection Methods
278278
- Provides a wrapper for the database command :manual:`getShardVersion
279279
</reference/command/getShardVersion/>`.
280280

281-
* - :method:`db.collection.insert()`
282-
283-
- Creates a new document in a collection.
284-
285281
* - :method:`db.collection.insertOne()`
286282

287283
- Inserts a new document in a collection.
@@ -302,10 +298,6 @@ Collection Methods
302298

303299
- Rebuilds all existing indexes on a collection.
304300

305-
* - :method:`db.collection.remove()`
306-
307-
- Deletes documents from a collection.
308-
309301
* - :method:`db.collection.renameCollection()`
310302

311303
- Changes the name of a collection.
@@ -314,11 +306,6 @@ Collection Methods
314306

315307
- Replaces a single document in a collection.
316308

317-
* - :method:`db.collection.save()`
318-
319-
- Provides a wrapper around :method:`~db.collection.insert()`
320-
and :method:`~db.collection.update()` to insert new documents.
321-
322309
* - :method:`db.collection.stats()`
323310

324311
- Reports on the state of a collection. Provides a wrapper around
@@ -341,10 +328,6 @@ Collection Methods
341328
- Reports the total size of a collection, including the size of
342329
all documents and all indexes on a collection.
343330

344-
* - :method:`db.collection.update()`
345-
346-
- Modifies a document in a collection.
347-
348331
* - :method:`db.collection.updateOne()`
349332

350333
- Modifies a single document in a collection.

source/write-scripts.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _mdb-shell-write-scripts:
22

33
=================================
4-
Write Scripts for the |mdb-shell|
4+
Write Scripts for the ``mongosh``
55
=================================
66

77
.. default-domain:: mongodb

0 commit comments

Comments
 (0)