diff --git a/source/includes/fact-mongosh-shell-method-deprecated.rst b/source/includes/fact-mongosh-shell-method-deprecated.rst new file mode 100644 index 00000000000..1ad3cd948e0 --- /dev/null +++ b/source/includes/fact-mongosh-shell-method-deprecated.rst @@ -0,0 +1,5 @@ +.. important:: Deprecated ``mongosh`` Method + + This method is deprecated in :binary:`~bin.mongosh`. For alternative + methods, see :ref:`compatibility`. + diff --git a/source/reference/method/db.collection.insert.txt b/source/reference/method/db.collection.insert.txt index 9147e612a71..38c998df5b5 100644 --- a/source/reference/method/db.collection.insert.txt +++ b/source/reference/method/db.collection.insert.txt @@ -10,15 +10,13 @@ db.collection.insert() :depth: 1 :class: singlecol +.. include:: /includes/fact-mongosh-shell-method-deprecated.rst + Definition ---------- .. method:: db.collection.insert() - - .. include:: /includes/fact-mongosh-shell-method.rst - - Inserts a document or documents into a collection. The :method:`~db.collection.insert()` method has the following diff --git a/source/reference/method/db.collection.remove.txt b/source/reference/method/db.collection.remove.txt index c0cbdf7eca3..a3cac865ff1 100644 --- a/source/reference/method/db.collection.remove.txt +++ b/source/reference/method/db.collection.remove.txt @@ -10,15 +10,13 @@ db.collection.remove() :depth: 1 :class: singlecol +.. include:: /includes/fact-mongosh-shell-method-deprecated.rst + Definition ---------- .. method:: db.collection.remove() - - .. include:: /includes/fact-mongosh-shell-method.rst - - Removes documents from a collection. The :method:`db.collection.remove()` method can have one of two diff --git a/source/reference/method/db.collection.update.txt b/source/reference/method/db.collection.update.txt index adaae84749c..7626421e49c 100644 --- a/source/reference/method/db.collection.update.txt +++ b/source/reference/method/db.collection.update.txt @@ -6,21 +6,19 @@ db.collection.update() .. default-domain:: mongodb - - .. contents:: On this page :local: :backlinks: none :depth: 1 :class: singlecol +.. include:: /includes/fact-mongosh-shell-method-deprecated.rst + Definition ---------- .. method:: db.collection.update(query, update, options) - .. include:: /includes/fact-mongosh-shell-method.rst - Modifies an existing document or documents in a collection. The method can modify specific fields of an existing document or documents or replace an existing document entirely, depending on the