File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,41 @@ When the LLM generates a query, users can open the query in a playground
30
30
file or run the query directly in their collection.
31
31
32
32
/query Example
33
- ~~~~~~~~~~~~~~
33
+ ~~~~~~~~~~~~~~
34
+
35
+ Consider a ``fruits`` collection that contains documents with the
36
+ following structure:
37
+
38
+ .. code-block:: javascript
39
+ :copyable: false
40
+
41
+ {
42
+ _id: 1,
43
+ item: "tangerine",
44
+ type: "citrus"
45
+ }
46
+
47
+
48
+ In the Github Copilot Chat tab, you can ask the MongoDB Copilot
49
+ participant to generate a query to find all documents in the ``fruits``
50
+ collection that have the type ``citrus``.
51
+
52
+ .. code-block:: javascript
53
+ :copyable: false
54
+
55
+ @MongoDB /query find all documents in the fruits collection that have
56
+ the type citrus
57
+
58
+ The Github Copilot Chat uses the MongoDB Copilot Participant to generate
59
+ the following query using knowledge of your database schema:
60
+
61
+ .. code-block:: javascript
62
+
63
+ use('fruit');
64
+ db.getCollection('fruit').find({ type: 'citrus' });
65
+
66
+
67
+
68
+
69
+
70
+
You can’t perform that action at this time.
0 commit comments