Skip to content

(DOCSP-11133): Add callout to mongosh #4200

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
Jul 21, 2020
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
4 changes: 3 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def has(self, *args):
'.. |branch| replace:: ``{0}``'.format(conf.git.branches.current),
'.. |bi| replace:: MongoDB Connector for BI',
'.. |version| replace:: {0}'.format(version),
'.. |compass| replace:: MongoDB Compass'
'.. |compass| replace:: MongoDB Compass',
'.. |mdb-shell| replace:: MongoDB Shell'
])

source_constants = {
Expand Down Expand Up @@ -101,6 +102,7 @@ def has(self, *args):
'mms-home': ('https://www.mongodb.com/cloud/cloud-manager%s', ''),
'opsmgr': ('https://docs.opsmanager.mongodb.com/current%s', ''),
'atlas': ('https://docs.atlas.mongodb.com%s',''),
'mongosh': ('https://docs.mongodb.com/mongodb-shell%s', ''),
'products': ('https://www.mongodb.com/products%s', ''),
'wtdocs': ('https://source.wiredtiger.com/mongodb-3.4%s', ''),
'perl-api': ('https://metacpan.org/pod/MongoDB::%s', ''),
Expand Down
2 changes: 2 additions & 0 deletions source/core/shell-types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Data Types in the ``mongo`` Shell
:depth: 2
:class: singlecol

.. include:: /includes/fact-mongosh-callout.rst

MongoDB :term:`BSON` provides support for additional data types than
:term:`JSON`. :ecosystem:`Drivers </drivers>` provide native
support for these data types in host languages and the
Expand Down
11 changes: 11 additions & 0 deletions source/includes/fact-mongosh-callout.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. note::

The following document pertains to the :binary:`~bin.mongo` shell
included in the
`MongoDB Server Download
<https://www.mongodb.com/try/download/community?tck=docs_server>`__.
For information on the new MongoDB Shell, ``mongosh``, refer to the
:mongosh:`mongosh Documentation </>`.

To understand the differences between the two shells, see
:ref:`compare-mongosh-mongo`.
33 changes: 33 additions & 0 deletions source/mongo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ The :binary:`~bin.mongo` shell is an interactive JavaScript interface to
MongoDB. You can use the :binary:`~bin.mongo` shell to query and update
data as well as perform administrative operations.

.. include:: /includes/fact-mongosh-callout.rst

Download the ``mongo`` Shell
----------------------------

Expand Down Expand Up @@ -395,10 +397,41 @@ Exit the Shell

To exit the shell, type ``quit()`` or use the ``<Ctrl-C>`` shortcut.

.. _compare-mongosh-mongo:

Comparison of the ``mongo`` Shell and ``mongosh``
-------------------------------------------------

.. note::

:mongosh:`mongosh </>` is currently available as a
**Beta** release. The product, its features, and the corresponding
documentation may change during the Beta stage.

The new MongoDB Shell, :mongosh:`mongosh </>`, offers numerous
advantages over the :binary:`~bin.mongo` shell, such as:

- Improved syntax highlighting.

- Improved command history.

- Improved logging.

During the beta stage, ``mongosh`` supports a subset of the
:binary:`~bin.mongo` shell methods. Achieving feature parity between
``mongosh`` and the ``mongo`` shell is an ongoing effort.

To maintain backwards compatibility, the methods that ``mongosh``
supports use the same syntax as the corresponding methods in the
:binary:`~bin.mongo` shell. To see the complete list of methods
supported by ``mongosh``, see
:mongosh:`MongoDB Shell Methods </reference/methods>`.

.. seealso::

- :gettingstarted:`Getting Started Guide </shell>`
- :binary:`~bin.mongo` Reference Page
- :mongosh:`mongosh Documentation </>`

.. class:: hidden

Expand Down
2 changes: 2 additions & 0 deletions source/reference/mongo-shell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
:depth: 1
:class: singlecol

.. include:: /includes/fact-mongosh-callout.rst

``mongo`` Shell Command History
-------------------------------

Expand Down
3 changes: 2 additions & 1 deletion source/tutorial/access-mongo-shell-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Access the ``mongo`` Shell Help
:depth: 1
:class: twocols

.. include:: /includes/fact-mongosh-callout.rst

In addition to the documentation in the :doc:`MongoDB Manual
</index>`, the :binary:`~bin.mongo` shell provides some additional
information in its "online" help system. This document provides an
Expand Down Expand Up @@ -174,4 +176,3 @@ shell, such as ``BinData()``, type ``help misc`` in the
help misc

.. seealso:: :doc:`/reference/method`

2 changes: 2 additions & 0 deletions source/tutorial/configure-mongo-shell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Configure the ``mongo`` Shell
:depth: 1
:class: singlecol

.. include:: /includes/fact-mongosh-callout.rst

.. _shell-use-a-custom-prompt:

Customize the Prompt
Expand Down
2 changes: 2 additions & 0 deletions source/tutorial/write-scripts-for-the-mongo-shell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Write Scripts for the ``mongo`` Shell
:depth: 1
:class: singlecol

.. include:: /includes/fact-mongosh-callout.rst

You can write scripts for the :binary:`~bin.mongo` shell in JavaScript that
manipulate data in MongoDB or perform administrative operation.

Expand Down