Skip to content

Commit fed6b9f

Browse files
committed
DOCSP-43493 using sample database
1 parent 4f22c05 commit fed6b9f

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

source/copilot.txt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,38 @@ file or run the query directly in your collection.
3838
Example
3939
~~~~~~~
4040

41-
Consider a ``fruits`` collection that contains documents with the
42-
following structure:
41+
Consider the ``users`` collection in the `Mflix Sample Database
42+
<`https://www.mongodb.com/docs/atlas/sample-data/sample-mflix/#sample_mflix.users>`__.
43+
Each document in the collection has the following structure:
4344

4445
.. code-block:: javascript
4546
:copyable: false
4647

4748
{
48-
_id: 1,
49-
item: "tangerine",
50-
type: "citrus"
49+
_id: {
50+
"$oid": "59b99db4cfa9a34dcd7885b6"
51+
},
52+
name: "Kayden Washington",
53+
54+
password: "11222021"
5155
}
52-
53-
Once you connect to the deployment that contains the ``fruits``
56+
Once you connect to the deployment that contains the ``users``
5457
collection, you can ask the Github Copilot chat to generate a query that
55-
finds all documents in the ``fruits`` collection that have the type
56-
``citrus``.
58+
finds the document in the ``users`` collection that has the ``name``
59+
value of `` "Kayden Washington"``.
5760

5861
.. code-block:: javascript
5962
:copyable: false
6063

61-
@MongoDB /query find all documents in the fruits collection that have
62-
the type citrus
64+
@MongoDB /query find a document in the users collection with the name
65+
of Kayden Washington.
6366

6467
The Github Copilot Chat uses the MongoDB Github Copilot Participant to
6568
generate the following query using knowledge of your database schema:
6669

6770
.. code-block:: javascript
6871

69-
db.getCollection('fruits').find({ type: 'citrus' })
72+
db.getCollection('users').findOne({ name: 'Kayden Washington' });
7073

7174

7275
.. toctree::

0 commit comments

Comments
 (0)