Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
53 changes: 53 additions & 0 deletions source/copilot-export-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _vsce-test-queries-copilot:

=======================
Export and Test Queries
=======================

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

You can use the :ref:`MongoDB Extension for Github Copilot
<vsce-copilot>` to export and test your application queries in
playgrounds.

.. note::

The :guilabel:`Export Code to Playground` feature is only available
if you enable |copilot|.

Export to Playground
--------------------

Use the following steps to test your application code in a playground:

.. procedure::
:style: normal

.. step:: Open the project file that contains the MongoDB query that you want to export.

.. step:: Highlight the query that you want to test.

.. step:: Right-click to select :guilabel:`Export Code to Playground`.

Right-click your selected code to open the options menu.
Click :guilabel:`MongoDB Copilot Extension` >
:guilabel:`Export Code to Playground`.

When you click :guilabel:`Export Code to Playground`, |vscode-short|
opens a new playground with your selected code in MongoDB shell
syntax.

Once you export your code to a playground, you can click
:icon-fa5:`play` on the top right of your window to run your query.

.. seealso::

- :ref:`vsce-playgrounds`
- :ref:`vsce-copilot`

1 change: 1 addition & 0 deletions source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Get Started
Connect </connect>
Manage Data </databases-collections>
Explore with Playgrounds </playgrounds>
Test Queries </copilot-export-test>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the miscommunication here @ltran-mdb2 – I meant to put this under "Explore with Playgrounds" tab, same level as "Export to Language".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also include the word "Driver" in here? We can call it "Test Driver Queries"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

MongoDB Extension for Github Copilot </copilot>
Create an Atlas Cluster with Terraform </create-cluster-terraform>
Reference </reference>
Expand Down
7 changes: 7 additions & 0 deletions source/playgrounds.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ panel, the |vsce| *Overview* page, or the |vscode| Command Pallette.

.. include:: /includes/steps/open-new-playground.rst

.. note::

You can also open a new playground to test and export queries with the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add this note at the top of the "Export to Language" page? That feature now exclusively requires our Copilot extension.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

:ref:`MongoDB Extension for Github Copilot <vsce-copilot>`. For more
information, see :ref:`Export and Test Queries with Copilot
<vsce-test-queries-copilot>`.

Open a Saved Playground
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Loading