Skip to content

DOCS-617 crud draft fix typos #339

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
Oct 22, 2012
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
19 changes: 10 additions & 9 deletions draft/core/documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Consider the following examples of MongoDB documents:
{ _id: 1 }

- The following document specifies the query criteria where ``_id``
is greater to ``3``:
is greater than ``3``:

.. code-block:: javascript

Expand All @@ -80,14 +80,15 @@ Consider the following examples of MongoDB documents:

When passed as an argument to methods such as the :method:`find()
<db.collection.find()>` method or the :method:`update()
<db.collection.update()>` method, the query document limits the
records returned or updated:
<db.collection.update()>` method, the query document determines which
records are returned or updated:

.. code-block:: javascript

db.csbios.find( { _id: 1 } )
db.csbios.find( { _id: { $gt: 3 } } )
db.csbios.find( { _id: 1, name: { first: 'John', last: 'Backus' } } )
db.csbios.update( { _id: 1, name: { first: 'John', last: 'Backus' } },
... )

- The following document specifies the update actions:

Expand Down Expand Up @@ -115,25 +116,25 @@ Consider the following examples of MongoDB documents:

.. code-block:: javascript

{ 'name.last': 1 }
{ 'name.last': 1, 'name.first':1 }

When passed as an argument to the :method:`sort() <cursor.sort()>`
method, the document specifies the sort order of the results:

.. code-block:: javascript

db.csbios.find().sort( { 'name.last': 1 } )
db.csbios.find().sort( { 'name.last': 1, 'name.first': 1 } )

- The following document specifies the index to create:
- The following document specifies the multi-key index to create:

.. code-block:: javascript

{ id:1, 'name.last': 1 }
{ _id:1, 'name.last': 1 }

When passed as an argument to the :method:`ensureIndex()
<db.collection.ensureIndex()>` method, the document specifies the
multi-key index to create on the fields ``_id`` and ``name.last``:

.. code-block:: javascript

db.csbios.ensureIndex( { id:1, 'name.last': 1 } )
db.csbios.ensureIndex( { _id: 1, 'name.last': 1 } )
7 changes: 7 additions & 0 deletions draft/core/read-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ Consider the ``query`` arguments in the following :method:`find()

db.inventory.find( { type: { $in: [ 'food', 'snacks' ] } } )

.. note::

Although you can express this query using the :operator:`$or`
operator, choose the :operator:`$in` operator rather than the
:operator:`$or` operator when performing equality checks on the
same field.

- Compound ``query`` argument specifies the criteria where the field
``type`` equals ``food`` **and** the field ``price`` is less than
``9.95``:
Expand Down