From f8778e2f9e729e2e030f02a1c5898ed8364ff808 Mon Sep 17 00:00:00 2001 From: kay Date: Mon, 12 Nov 2012 15:09:55 -0500 Subject: [PATCH] DOCS-535 minor edits from this morning --- .../table-sql-to-mongo-schema-examples.yaml | 46 ++++++------------- .../table-sql-to-mongo-select-examples.yaml | 9 +--- 2 files changed, 15 insertions(+), 40 deletions(-) diff --git a/source/includes/table-sql-to-mongo-schema-examples.yaml b/source/includes/table-sql-to-mongo-schema-examples.yaml index 7277eacf8ee..e1f0cc0a240 100644 --- a/source/includes/table-sql-to-mongo-schema-examples.yaml +++ b/source/includes/table-sql-to-mongo-schema-examples.yaml @@ -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 @@ -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 + ` wiki page for more information. ref2: | See :method:`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 + ` wiki page for more information. ref3: | - See :method:`update() ` - and :operator:`$unset` for more information. + See :method:`update() ` and + :operator:`$set` for more information on changing the structure + of documents in a collection. sql4: | .. code-block:: sql @@ -129,8 +111,8 @@ mongo6: | .. code-block:: javascript :emphasize-lines: 1 - db.users.remove() + db.users.drop() ref6: | - See :method:`remove() ` for + See :method:`drop() ` for more information. ... diff --git a/source/includes/table-sql-to-mongo-select-examples.yaml b/source/includes/table-sql-to-mongo-select-examples.yaml index 4e75e2a9f67..cbe56aa5f82 100644 --- a/source/includes/table-sql-to-mongo-select-examples.yaml +++ b/source/includes/table-sql-to-mongo-select-examples.yaml @@ -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() ` for more information.