Skip to content

DOCSP-1501 - Integrating Compass tab into Delete Documents page #3159

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
Dec 11, 2017
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
Binary file added source/images/compass-delete-button-click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/compass-delete-confirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/compass-delete-paper-find.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/compass-table-btn-click-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion source/includes/driver-example-delete-55.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,35 @@
{ item: "paper", qty: 100, size: { h: 8.5, w: 11, uom: "in" }, status: "D" },
{ item: "planner", qty: 75, size: { h: 22.85, w: 30, uom: "cm" }, status: "D" },
{ item: "postcard", qty: 45, size: { h: 10, w: 15.25, uom: "cm" }, status: "A" },
]);
] );

.. only:: website

You can run the operation in the web shell below:

.. include:: /includes/fact-mws.rst

- id: compass
content: |
.. code-block:: javascript

[
{ item: "journal", qty: 25, size: { h: 14, w: 21, uom: "cm" }, status: "A" },
{ item: "notebook", qty: 50, size: { h: 8.5, w: 11, uom: "in" }, status: "P" },
{ item: "paper", qty: 100, size: { h: 8.5, w: 11, uom: "in" }, status: "D" },
{ item: "planner", qty: 75, size: { h: 22.85, w: 30, uom: "cm" }, status: "D" },
{ item: "postcard", qty: 45, size: { h: 10, w: 15.25, uom: "cm" }, status: "A" },
]

For instructions on inserting documents in MongoDB Compass, see
:doc:`Insert Documents </tutorial/insert-documents/>`.

.. note::

For complete reference on inserting documents in MongoDB
Compass, see the
:ref:`Compass documentation <insert-documents>`.

- id: python
content: |
.. class:: copyable-code
Expand Down
59 changes: 59 additions & 0 deletions source/includes/driver-example-delete-58.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,65 @@

db.inventory.deleteOne( { status: "D" } )

- id: compass
content: |

1. Click the :guilabel:`Table` button in the top navigation
to access the :ref:`Table View <documents-table-view>`:

.. figure:: /images/compass-table-btn-click-2.png

.. raw:: html

<br>

#. Use the Compass :ref:`query bar <query-bar-filter>` to
locate the target document.

Copy the following filter document into the query bar and click
:guilabel:`Find`:

.. class:: copyable-code
.. code-block:: javascript

{ item: "paper" }

.. figure:: /images/compass-delete-paper-find.png

.. raw:: html

<br>

#. Hover over the document and click the trash icon which
appears on the right-hand side:

.. raw:: html

<br>

.. figure:: /images/compass-delete-button-click.png

.. raw:: html

<br>

After clicking the delete button, the document is flagged
for deletion and Compass asks for confirmation that you
want to remove the document:

.. raw:: html

<br>

.. figure:: /images/compass-delete-confirm.png

.. raw:: html

<br>

#. Click :guilabel:`Delete` to confirm. Compass deletes the
document from the collection.

- id: python
content: |
.. class:: copyable-code
Expand Down
2 changes: 2 additions & 0 deletions source/includes/fact-delete-all-inventory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The following example deletes *all* documents from the ``inventory``
collection:
3 changes: 3 additions & 0 deletions source/includes/fact-delete-condition-inventory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You can specify criteria, or filters, that identify the documents to
delete. The :ref:`filters <document-query-filter>` use the same syntax
as read operations.
2 changes: 2 additions & 0 deletions source/includes/fact-populate-inventory-coll.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The examples on this page use the ``inventory`` collection. To populate
the ``inventory`` collection, run the following:
2 changes: 2 additions & 0 deletions source/includes/fact-remove-condition-inv-example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The following example removes all documents from the ``inventory``
collection where the ``status`` field equals ``"A"``:
2 changes: 2 additions & 0 deletions source/includes/fact-remove-one-condition-inv-example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The following example deletes the *first* document where ``status`` is
``"D"``:
Loading