From ab2da9d997169d31790ecf90124420450291550c Mon Sep 17 00:00:00 2001 From: Kanchana Sekhar Date: Tue, 20 Feb 2024 09:27:41 -0800 Subject: [PATCH] DOCSP-27021 add doc for tree explorer document context menu --- source/databases-collections.txt | 39 ++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/source/databases-collections.txt b/source/databases-collections.txt index 13722d07..005cf2dd 100644 --- a/source/databases-collections.txt +++ b/source/databases-collections.txt @@ -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 @@ -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: 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