Skip to content

Commit 23f818c

Browse files
Adding copyable compass queries and projections
1 parent 303bc94 commit 23f818c

8 files changed

+104
-0
lines changed

source/includes/driver-example-query-43.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
1111
- id: compass
1212
content: |
13+
Copy the following expression into the :guilabel:`Filter` bar
14+
and click :guilabel:`Find`:
15+
16+
.. class:: copyable-code
17+
.. code-block:: javascript
18+
19+
{ status: "A" }
20+
21+
1322
.. figure:: /images/compass-project-all-fields.png
1423

1524
- id: python

source/includes/driver-example-query-44.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
1111
- id: compass
1212
content: |
13+
Copy the following expression into the :guilabel:`Filter` bar:
14+
15+
.. class:: copyable-code
16+
.. code-block:: javascript
17+
18+
{ status: "A" }
19+
20+
And copy the following expression into the :guilabel:`Project`
21+
bar:
22+
23+
.. class:: copyable-code
24+
.. code-block:: javascript
25+
26+
{ item: 1, status: 1 }
27+
1328
.. figure:: /images/compass-project-specified-plus-id.png
1429

1530
- id: python

source/includes/driver-example-query-45.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
1111
- id: compass
1212
content: |
13+
Copy the following expression into the :guilabel:`Filter` bar:
14+
15+
.. class:: copyable-code
16+
.. code-block:: javascript
17+
18+
{ status: "A" }
19+
20+
And copy the following expression into the :guilabel:`Project`
21+
bar:
22+
23+
.. class:: copyable-code
24+
.. code-block:: javascript
25+
26+
{ item: 1, status: 1, _id: 0 }
27+
1328
.. figure:: /images/compass-project-suppress-id.png
1429

1530
- id: python

source/includes/driver-example-query-46.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
1111
- id: compass
1212
content: |
13+
Copy the following expression into the :guilabel:`Filter` bar:
14+
15+
.. class:: copyable-code
16+
.. code-block:: javascript
17+
18+
{ status: "A" }
19+
20+
And copy the following expression into the :guilabel:`Project`
21+
bar:
22+
23+
.. class:: copyable-code
24+
.. code-block:: javascript
25+
26+
{ status: 0, instock: 0 }
27+
1328
.. figure:: /images/compass-project-exclude-fields.png
1429

1530
- id: python

source/includes/driver-example-query-47.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@
1313
1414
- id: compass
1515
content: |
16+
Copy the following expression into the :guilabel:`Filter` bar:
17+
18+
.. class:: copyable-code
19+
.. code-block:: javascript
20+
21+
{ status: "A" }
22+
23+
And copy the following expression into the :guilabel:`Project`
24+
bar:
25+
26+
.. class:: copyable-code
27+
.. code-block:: javascript
28+
29+
{ item: 1, status: 1, "size.uom": 1 }
30+
1631
.. figure:: /images/compass-project-embedded-fields.png
1732

1833
- id: python

source/includes/driver-example-query-48.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@
1313
1414
- id: compass
1515
content: |
16+
Copy the following expression into the :guilabel:`Filter` bar:
17+
18+
.. class:: copyable-code
19+
.. code-block:: javascript
20+
21+
{ status: "A" }
22+
23+
And copy the following expression into the :guilabel:`Project`
24+
bar:
25+
26+
.. class:: copyable-code
27+
.. code-block:: javascript
28+
29+
{ "size.uom": 0 }
30+
1631
.. figure:: /images/compass-project-suppress-embedded-field.png
1732

1833
- id: python

source/includes/driver-example-query-49.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
1111
- id: compass
1212
content: |
13+
Copy the following expression into the :guilabel:`Filter` bar:
14+
15+
.. class:: copyable-code
16+
.. code-block:: javascript
17+
18+
{ status: "A" }
19+
20+
And copy the following expression into the :guilabel:`Project`
21+
bar:
22+
23+
.. class:: copyable-code
24+
.. code-block:: javascript
25+
26+
{ item: 1, status: 1, "instock.qty": 1 }
27+
1328
.. figure:: /images/compass-project-embedded-array-docs.png
1429

1530
- id: python

source/tutorial/project-fields-from-query-results.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ Return All Fields in Matching Documents
3434
:method:`db.collection.find()` method returns all fields in the
3535
matching documents.
3636

37+
- id: compass
38+
content: |
39+
If you do not specify a :term:`projection` document, Compass
40+
returns all fields in the matching documents.
41+
3742
- id: python
3843
content: |
3944
If you do not specify a :term:`projection` document, the

0 commit comments

Comments
 (0)