From 346bf33373aaa64491615cb0d47ed80af0b90423 Mon Sep 17 00:00:00 2001 From: Danilo de Jesus da Silva Bellini Date: Thu, 28 Mar 2013 03:03:51 -0300 Subject: [PATCH] a drop "column" example using $unset --- .../table-sql-to-mongo-schema-examples.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/includes/table-sql-to-mongo-schema-examples.yaml b/source/includes/table-sql-to-mongo-schema-examples.yaml index b670ad5ba16..4d6da3c80b4 100644 --- a/source/includes/table-sql-to-mongo-schema-examples.yaml +++ b/source/includes/table-sql-to-mongo-schema-examples.yaml @@ -72,13 +72,17 @@ sql3: | ALTER TABLE users DROP COLUMN join_date mongo3: | - Collections do not describe or enforce the structure of the - constituent documents. See the :doc:`/core/data-modeling` - page for more information. + .. code-block:: javascript + :emphasize-lines: 1-5 + + db.users.update( + { }, + { $unset: { join_date: "" } }, + { multi: true } + ) ref3: | See :method:`update() ` and - :operator:`$set` for more information on changing the structure - of documents in a collection. + :operator:`$unset` for more information. sql4: | .. code-block:: sql