@@ -306,7 +306,7 @@ Behavioral Changes
306
306
Restrictions on Collection Names
307
307
````````````````````````````````
308
308
309
- Collection names cannot contain the ``$`` character in version 2.2 . The
309
+ In version 2.2, collection names cannot contain the ``$`` character. The
310
310
character is still allowed for collection names in MongoDB versions
311
311
prior to 2.2.
312
312
@@ -323,33 +323,34 @@ names can be any UTF-8 string with the following exceptions:
323
323
324
324
- Do not name a collection using the ``system.`` prefix. The ``system.``
325
325
prefix is reserved for system collections, such as the
326
- ``system.indexes`` collection that stores index keys .
326
+ ``system.indexes`` collection.
327
327
328
328
- The maximum size of a collection name is 128 characters, including the
329
329
name of the db and indexes. A best practice is to keep your collection
330
330
names below 80 characters.
331
331
332
332
If your collection name includes special characters, such as the
333
333
underscore character, then to access the collection use the
334
- :method:`db.getCollection()` method or a similar :api:`method for your
334
+ :method:`db.getCollection()` method or a :api:`similar method for your
335
335
driver <>`.
336
336
337
- .. example:: For example, to create a collection ``_foo`` and populate it
338
- with document ``{ a : 1 }``, you issue the following command:
337
+ .. example:: To create a collection ``_foo`` and populate it with
338
+ document ``{ a : 1 }``, you would issue the following command:
339
339
340
340
.. code-block:: javascript
341
341
342
342
db.getCollection("_foo").insert( { a : 1 } )
343
343
344
- To query the collection you issue the following command and get the
345
- following result:
344
+ To query the collection, you would issue the following command and
345
+ get the following result:
346
346
347
347
.. code-block:: javascript
348
348
349
349
db.getCollection("_foo").find()
350
350
{ "_id" : ObjectId("506dbf800f70bf70d1ca613b"), "a" : 1 }
351
351
352
- You *cannot* query the ``_foo`` collection with this command:
352
+ If you were to query the ``_foo`` collection with dot notation, you
353
+ would receive an error, as shown here:
353
354
354
355
.. code-block:: javascript
355
356
0 commit comments