Skip to content

DOCSP-15489 update mongo shell banner for mongosh #5280

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
May 3, 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: 0 additions & 5 deletions source/includes/fact-mongo-shell-method-toc.rst

This file was deleted.

7 changes: 0 additions & 7 deletions source/includes/fact-mongo-shell-method.rst

This file was deleted.

18 changes: 18 additions & 0 deletions source/includes/fact-mongosh-shell-method-toc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
The methods listed on this table of contents page are
:mongosh:`mongosh </>` methods. This is *not* the documention for
``Node.js`` or other programming language specific driver methods.

In most cases :mongosh:`mongosh </>` methods work the same way as the
legacy :binary:`~bin.mongo` shell methods. However, some legacy methods
are unavailable in ``mongosh``.

For legacy :binary:`~bin.mongo` shell documention, refer to the
documentation for the corresponding ``MongoDB`` release.

- :v4.4:`mongo shell v4.4 </mongo>`
- :v4.2:`mongo shell v4.2 </mongo>`
- :v4.0:`mongo shell v4.0 </mongo>`

For MongoDB API drivers, refer to the language specific
:driver:`MongoDB driver </>` documentation.

20 changes: 20 additions & 0 deletions source/includes/fact-mongosh-shell-method.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. important:: ``mongosh`` Method

This is a :mongosh:`mongosh </>` method. This is *not* the
documention for ``Node.js`` or other programming language specific
driver methods.

In most cases :mongosh:`mongosh </>` methods work the same way as
the legacy :binary:`~bin.mongo` shell methods. However, some legacy
methods are unavailable in ``mongosh``.

For legacy :binary:`~bin.mongo` shell documention, refer to the
documentation for the corresponding ``MongoDB`` release.

- :v4.4:`mongo shell v4.4 </mongo>`
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: This link is not yet live so it doesn't appear on the staging page. The link will be updated before the docs are released.

- :v4.2:`mongo shell v4.2 </mongo>`
- :v4.0:`mongo shell v4.0 </mongo>`

For MongoDB API drivers, refer to the language specific
:driver:`MongoDB driver </>` documentation.

6 changes: 3 additions & 3 deletions source/reference/method.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _js-administrative-methods:

=======================
``mongo`` Shell Methods
=======================
===================
``mongosh`` Methods
===================

.. default-domain:: mongodb

Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.addOption.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.addOption(flag)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. include:: /includes/extracts/mongo-shell-deprecated-meta-operator-cursor-addOption.rst
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.allowDiskUse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Definition
.. method:: cursor.allowDiskUse()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst

:method:`~cursor.allowDiskUse()` allows MongoDB to use temporary
files on disk to store data exceeding the 100 megabyte system memory
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.allowPartialResults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Definition

.. method:: cursor.allowPartialResults()

.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst

When used with :method:`db.collection.find()` operations against a
sharded collection, returns partial results, rather than an error,
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.batchSize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.batchSize(size)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Specifies the
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.close.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Definition
.. method:: cursor.close()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Instructs the server to close a :ref:`cursor <read-operations-cursors>`
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.collation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Definition
.. method:: cursor.collation(<collation document>)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionadded:: 3.4
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.comment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.comment()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionadded:: 3.2
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.count()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. note::
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.explain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Definition

.. method:: cursor.explain(verbosity)

.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst

Provides information on the query plan for the
:method:`db.collection.find()` method.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.forEach.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description
.. method:: cursor.forEach(function)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Iterates the cursor to apply a JavaScript ``function`` to each
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.hasNext.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.hasNext()
.. method:: cursor.hasNext()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:returns: Boolean.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.hint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.hint(index)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Call this method on a query to override MongoDB's default index
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.isClosed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.isClosed()
.. method:: cursor.isClosed()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:returns: Boolean.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.isExhausted.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.isExhausted()
.. method:: cursor.isExhausted()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:returns: Boolean.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.itcount.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.itcount()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Counts the number of documents remaining in a cursor.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.limit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.limit()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Use the :method:`~cursor.limit()` method on a cursor to specify the maximum
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.map()
.. method:: cursor.map(function)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Applies ``function`` to each document visited by the cursor and
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.max.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.max()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Specifies the *exclusive* upper bound for a specific index in order
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.maxTimeMS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.maxTimeMS(<time limit>)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Specifies a cumulative time limit in milliseconds for processing
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.min.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.min()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Specifies the *inclusive* lower bound for a specific index in order
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.next.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.next()
.. method:: cursor.next()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:returns: The next document in the cursor returned by the
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.noCursorTimeout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Definition
.. method:: cursor.noCursorTimeout()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Instructs the server to avoid closing a cursor automatically after a period
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.objsLeftInBatch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.objsLeftInBatch()
.. method:: cursor.objsLeftInBatch()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:method:`cursor.objsLeftInBatch()` returns the number of
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.pretty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.pretty()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Configures the cursor to display results in an easy-to-read format.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.readConcern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Definition
.. method:: cursor.readConcern(level)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionadded:: 3.2
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.readPref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.readPref(mode, tagSet, hedgeOptions)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Append :method:`~cursor.readPref()` to a cursor to
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.returnKey.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.returnKey()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst

.. tip::

Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.showRecordId.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.showRecordId()
.. method:: cursor.showRecordId()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionchanged:: 3.2
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.size.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.size()
.. method:: cursor.size()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


:returns: A count of the number of documents that match the
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.skip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.skip(<offset>)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Call the :method:`~cursor.skip()` method on a cursor to control where
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.sort.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.sort(sort)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Specifies the order in which the query returns matching documents.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.tailable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: cursor.tailable()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionadded:: 3.2
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/cursor.toArray.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cursor.toArray()
.. method:: cursor.toArray()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


The :method:`~cursor.toArray()` method returns an array that
Expand Down
2 changes: 2 additions & 0 deletions source/reference/method/db.adminCommand.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ db.adminCommand()
:depth: 1
:class: singlecol

.. include:: /includes/fact-mongosh-shell-method.rst

Definition
----------

Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/db.collection.aggregate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: db.collection.aggregate(pipeline, options)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


Calculates aggregate values for the data in a collection or a :doc:`view </core/views>`.
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/db.collection.bulkWrite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: db.collection.bulkWrite()


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. versionadded:: 3.2
Expand Down
2 changes: 1 addition & 1 deletion source/reference/method/db.collection.copyTo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Definition
.. method:: db.collection.copyTo(newCollection)


.. include:: /includes/fact-mongo-shell-method.rst
.. include:: /includes/fact-mongosh-shell-method.rst


.. deprecated:: 3.0
Expand Down
Loading