@@ -116,22 +116,22 @@ the :method:`~db.collection.insertOne()` operation:
116
116
db.myCollection.insertOne( { x: 1 } );
117
117
118
118
The :method:`db.myCollection.insertOne() <db.collection.insertOne()>` is one
119
- of the :doc:`methods available in the mongo shell </reference/method>`
119
+ of the :doc:`methods available in the mongo shell </reference/method>`.
120
120
121
121
- ``db`` refers to the current database.
122
122
123
123
- ``myCollection`` is the name of the collection.
124
124
125
- If the :program:`mongo` shell does not accept the name of the
126
- collection, for instance if the name contains a space, hyphen, or
127
- starts with a number, you can use an alternate syntax to refer to the
128
- collection, as in the following :
125
+ If the :program:`mongo` shell does not accept the name of a collection,
126
+ you can use the alternative :method:`db.getCollection()` syntax.
127
+ For instance, if a collection name contains a space or hyphen, starts
128
+ with a number, or conflicts with a built-in function :
129
129
130
130
.. code-block:: javascript
131
131
132
- db["3test"] .find()
133
-
134
- db.getCollection("3test ").find()
132
+ db.getCollection("3 test") .find()
133
+ db.getCollection("3-test").find()
134
+ db.getCollection("stats ").find()
135
135
136
136
.. include:: /includes/fact-mongo-prompt-size.rst
137
137
0 commit comments