Skip to content

DOCSP-15890 update deprecated mongosh crud methods #6114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions source/includes/fact-mongosh-shell-method-deprecated.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. important:: Deprecated ``mongosh`` Method

This method is deprecated in :binary:`~bin.mongosh`. For alternative
methods, see :ref:`compatibility`.

6 changes: 2 additions & 4 deletions source/reference/method/db.collection.insert.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions source/reference/method/db.collection.remove.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions source/reference/method/db.collection.update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down