Skip to content

DOCS-535 minor edits from this morning #394

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
Nov 12, 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
46 changes: 14 additions & 32 deletions source/includes/table-sql-to-mongo-schema-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mongo1: |
status: "A"
} )

However, you can also explicitly create a table:
However, you can also explicitly create a collection:

.. code-block:: javascript
:emphasize-lines: 1
Expand All @@ -59,44 +59,26 @@ sql2: |
ALTER TABLE users
ADD join_date DATETIME
mongo2: |
Update operations can add fields to all documents in a
collection:

.. code-block:: javascript
:emphasize-lines: 1-5

db.users.update(
{ },
{ $set: { join_date: null } },
{ multi: 1 }
)

Because each :term:`document` determines its own fields, a
document may contain fields not contained by the other
documents in the collection.
Collections do not describe or enforce the structure of the
constituent documents. See the :wiki:`Schema Design
<Schema+Design>` wiki page for more information.
ref2: |
See :method:`update() <db.collection.update()>` and
:operator:`$set` for more information.
:operator:`$set` for more information on changing the structure
of documents in a collection.
sql3: |
.. code-block:: sql

ALTER TABLE users
DROP COLUMN join_date
mongo3: |
Update operations can remove fields from all documents in a
collection:

.. code-block:: javascript
:emphasize-lines: 1-5

db.users.update(
{ },
{ $unset: { join_date: "" } },
{ multi: 1 }
)
Collections do not describe or enforce the structure of the
constituent documents. See the :wiki:`Schema Design
<Schema+Design>` wiki page for more information.
ref3: |
See :method:`update() <db.collection.update()>`
and :operator:`$unset` for more information.
See :method:`update() <db.collection.update()>` and
:operator:`$set` for more information on changing the structure
of documents in a collection.
sql4: |
.. code-block:: sql

Expand Down Expand Up @@ -129,8 +111,8 @@ mongo6: |
.. code-block:: javascript
:emphasize-lines: 1

db.users.remove()
db.users.drop()
ref6: |
See :method:`remove() <db.collection.remove()>` for
See :method:`drop() <db.collection.drop()>` for
more information.
...
9 changes: 1 addition & 8 deletions source/includes/table-sql-to-mongo-select-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ mongo1: |
.. code-block:: javascript
:emphasize-lines: 1

db.users.find( )

*or*

.. code-block:: javascript
:emphasize-lines: 1

db.users.find( { } )
db.users.find()
ref1: |
See :method:`find() <db.collection.find()>`
for more information.
Expand Down