Skip to content

Commit

Permalink
DOCSP-27021 add doc for tree explorer document context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kanchana-mongodb committed Feb 20, 2024
1 parent c5e3e69 commit ab2da9d
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions source/databases-collections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ When you expand a collection's documents, |vsce| lists the ``_id`` of
each document in the collection. Click an ``_id`` value to open that
document in |vscode-short| and view its contents.

You may edit this single document:
*To open a document in the collection*, you can also do the following:

1. Right-click the ID of the document that you want to open.
2. Click :guilabel:`Open Document`.

*To edit this single document*:

.. include:: /includes/seq-edit-document.rst

Expand All @@ -63,11 +68,41 @@ You may edit this single document:
Users must have the :authaction:`listCollections` permission in
order to view a collection's documents.

To view all of the collection's documents in an array, you can:
*To view all of the collection's documents* in an array, you can:

Check failure on line 71 in source/databases-collections.txt

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.Wordiness] Consider using 'all' instead of 'all of'. Raw Output: {"message": "[MongoDB.Wordiness] Consider using 'all' instead of 'all of'.", "location": {"path": "source/databases-collections.txt", "range": {"start": {"line": 71, "column": 10}}}, "severity": "ERROR"}

1. Right-click a collection.
2. Click :guilabel:`View Documents`.

*To copy a document in the collection*, you can:

1. Right-click the ID of the document that document you want to copy.
2. Click :guilabel:`Copy Document`.

|vsce| copies the document to your clipboard.

*To clone a document in the collection*, you can:

1. Right-click the ID of the document that document you want to clone.
#. Click :guilabel:`Clone Document`.

|vsce| opens the Playground where it displays the command to insert
one new document in the collection.

#. Remove or replace the ``_id`` field and make any other changes to the
cloned document.
#. Click the :guilabel:`Play Button` in VS Code's top navigation bar to
insert this document in the collection.
#. Click :guilabel:`Yes` to confirm.

The :guilabel:`Playground Result` window displays the inserted ID of
the new document.

*To remove a document from the collection*, you can:

1. Right-click the ID of the document that document you want to remove.
2. Click :guilabel:`Delete Document`.
3. Click :guilabel:`Yes` to confirm.

.. include:: /includes/admonitions/document-search-template.rst

Schema
Expand Down

0 comments on commit ab2da9d

Please sign in to comment.