Skip to content

Commit ef5187b

Browse files
committed
DOCS-959 minor copy edits
1 parent 1fcb424 commit ef5187b

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

source/faq/mongo.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ How can I enter multi-line operations in the ``mongo`` shell?
1414
-------------------------------------------------------------
1515

1616
If you end a line with an open parenthesis (``'('``), an open brace
17-
(``'{'``), or an open bracket (``'['``), then the following lines start
17+
(``'{'``), or an open bracket (``'['``), then the subsequent lines start
1818
with ellipsis (``"..."``) until the you enter the corresponding closing
1919
parenthesis (``')'``), the closing brace (``'}'``) or the closing
2020
bracket (``']'``). The :program:`mongo` shell waits for the closing
@@ -62,8 +62,8 @@ Does the ``mongo`` shell support tab completion and other keyboard shortcuts?
6262
The :program:`mongo` shell supports keyboard shortcuts. For example,
6363

6464
- Use the up/down arrow keys to scroll through command history. See
65-
:ref:`.dbshell.js <mongo-dbshell-file>` documentation for more
66-
information on the ``.dbshell.js`` file.
65+
:ref:`.dbshell <mongo-dbshell-file>` documentation for more
66+
information on the ``.dbshell`` file.
6767

6868
- Use ``<Tab>`` to autocomplete or to list the completion
6969
possibilities, as in the following example which uses ``<Tab>`` to

source/tutorial/getting-started-with-the-mongo-shell.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ Getting Started with the ``mongo`` Shell
55
.. default-domain:: mongodb
66

77
This document provides a basic introduction to using the
8-
:program:`mongo` shell. See :doc:`/tutorial/getting-started` for an
9-
introduction to basic MongoDB operations and use. See
10-
:doc:`/installation` for instructions on installing MongoDB for your
11-
system.
8+
:program:`mongo` shell. See :doc:`/installation` for instructions on
9+
installing MongoDB for your system.
1210

1311
Start the ``mongo`` Shell
1412
-------------------------
@@ -61,12 +59,12 @@ available options.
6159
When starting, :program:`mongo` checks the user's :envvar:`HOME`
6260
directory for a JavaScript file named :ref:`.mongorc.js
6361
<mongo-mongorc-file>`. If found, :program:`mongo` interprets the
64-
content :file:`.mongorc.js` before displaying the prompt for
65-
the first time. If you use the shell to evaluate a JavaScript file
66-
or expression either on the command line with :option:`--eval` or
67-
by specifying :ref:`a .js file to mongo <mongo-shell-file>`,
68-
:program:`mongo` will read the ``.mongorc.js`` file *after* the
69-
JavaScript has finished processing.
62+
content of :file:`.mongorc.js` before displaying the prompt for the
63+
first time. If you use the shell to evaluate a JavaScript file or
64+
expression, either by using the :option:`--eval` option on the
65+
command line or by specifying :ref:`a .js file to mongo
66+
<mongo-shell-file>`, :program:`mongo` will read the ``.mongorc.js``
67+
file *after* the JavaScript has finished processing.
7068

7169
.. _mongo-shell-executing-queries:
7270

@@ -80,7 +78,7 @@ From the :program:`mongo` shell, you can use the :doc:`shell methods
8078

8179
db.<collection>.find()
8280

83-
- The ``db`` is a variable that refers to the current database.
81+
- The ``db`` refers to the current database.
8482

8583
- The ``<collection>`` is the name of the collection to query. See
8684
:ref:`mongo-shell-help-collection` to list the available collections.
@@ -105,7 +103,7 @@ From the :program:`mongo` shell, you can use the :doc:`shell methods
105103
first 20 documents that match the query. The :program:`mongo` shell
106104
will prompt ``Type it`` to iterate another 20 times.
107105

108-
You can set the ``DBQuery.shellBatchSize`` variable to change the
106+
You can set the ``DBQuery.shellBatchSize`` attribute to change the
109107
number of iteration from the default value ``20``, as in the
110108
following example which sets it to ``10``:
111109

source/tutorial/write-scripts-for-the-mongo-shell.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ instantiate database connections using the ``Mongo()`` constructor:
3030

3131
Consider the following example that instantiates a new connection to
3232
the MongoDB instance running on localhost on the default port and sets
33-
the current ``db`` to ``myDatabase``:
33+
the current ``db`` to ``myDatabase`` using the ``getDB()`` method:
3434

3535
.. code-block:: javascript
3636

3737
conn = new Mongo();
3838
db = conn.getDB("myDatabase");
3939

40-
Additionally, you can use the ``connect`` method to connect to the
40+
Additionally, you can use the ``connect()`` method to connect to the
4141
MongoDB instance. The following example connects to the MongoDB
4242
instance that is running on ``localhost`` with the non-default port
4343
``207020`` and set the current ``db``:
@@ -47,12 +47,12 @@ instance that is running on ``localhost`` with the non-default port
4747
db = connect("localhost:27020/myDatabase");
4848

4949
If you create new connections inside a :ref:`JavaScript file
50-
<mongo-shell-javascript-file>`, you must specify the ``db`` variable in
51-
the specified methods. You **cannot** use ``use <dbname>`` inside the
52-
file. Additionally, inside the script, you would need to call
53-
:method:`db.getLastErrorObj()` or :method:`db.getLastError()`
54-
explicitly to wait for the result of :doc:`write
55-
operations</core/write-operations>`.
50+
<mongo-shell-javascript-file>`, you must assign the ``db`` variable
51+
using the ``getDB()`` method or the ``connect()`` method. You
52+
**cannot** use ``use <dbname>`` inside the file. Additionally, inside
53+
the script, you would need to call :method:`db.getLastErrorObj()` or
54+
:method:`db.getLastError()` explicitly to wait for the result of
55+
:doc:`write operations</core/write-operations>`.
5656

5757
.. _mongo-shell-scripting:
5858

0 commit comments

Comments
 (0)