Skip to content

Commit

Permalink
move includes/driver-example-* files into includes/driver-examples/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
kay-kim committed Jun 14, 2018
1 parent b5e4651 commit 85171fd
Show file tree
Hide file tree
Showing 74 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ composite-pages.yaml
!bin/*/mongodb-domain.yaml
meta.yaml
build
driver-examples/
source/driver-examples/
*~
source/reference/*/*.rst
source/reference/*/*/*.rst
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions source/indexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ this index on the ``_id`` field.
Create an Index
---------------

.. include:: /includes/driver-example-indexes-1.rst
.. include:: /includes/driver-examples/driver-example-indexes-1.rst

.. [#b-tree] MongoDB indexes use a B-tree data structure.

Expand Down Expand Up @@ -231,7 +231,7 @@ Indexes and Collation

.. include:: /includes/extracts/collation-versionadded.rst

.. include:: /includes/driver-example-indexes-2.rst
.. include:: /includes/driver-examples/driver-example-indexes-2.rst

.. include:: /includes/extracts/collation-index-use.rst

Expand Down
12 changes: 6 additions & 6 deletions source/tutorial/getting-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Select All Documents
:ref:`query filter document <document-query-filter>` to the
:node-api:`Collection.find() <Collection.html#find>` method:

.. include:: /includes/driver-example-query-7.rst
.. include:: /includes/driver-examples/driver-example-query-7.rst

.. tabs-drivers::

Expand Down Expand Up @@ -307,7 +307,7 @@ Select All Documents
selects from the ``inventory`` collection all documents where the
``status`` equals ``"D"``:

.. include:: /includes/driver-example-query-9.rst
.. include:: /includes/driver-examples/driver-example-query-9.rst

Match an Embedded Document
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -316,7 +316,7 @@ match of the specified ``<value>`` document, including the field order. For
example, the following query selects all documents where the field ``size``
equals the document ``{ h: 14, w: 21, uom: "cm" }``:

.. include:: /includes/driver-example-query-15.rst
.. include:: /includes/driver-examples/driver-example-query-15.rst

.. tabs-drivers::

Expand All @@ -336,7 +336,7 @@ Match a Field in an Embedded Document
The following example selects all documents where the field ``uom``
nested in the ``size`` field equals the string value ``"in"``:

.. include:: /includes/driver-example-query-17.rst
.. include:: /includes/driver-examples/driver-example-query-17.rst

.. tabs-drivers::

Expand All @@ -356,7 +356,7 @@ Match an Element in an Array
The following example queries for all documents where ``tags`` is an
array that contains the string ``"red"`` as one of its elements:

.. include:: /includes/driver-example-query-23.rst
.. include:: /includes/driver-examples/driver-example-query-23.rst

.. tabs-drivers::

Expand All @@ -377,7 +377,7 @@ The following example queries for all documents where the field ``tags``
value is an array with exactly two elements, ``"red"`` and ``"blank"``,
in the specified order:

.. include:: /includes/driver-example-query-21.rst
.. include:: /includes/driver-examples/driver-example-query-21.rst

.. tabs-drivers::

Expand Down
8 changes: 4 additions & 4 deletions source/tutorial/insert-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Insert a Single Document
with an ObjectId value to the new document. See
:ref:`write-op-insert-behavior`.

.. include:: /includes/driver-example-insert-1.rst
.. include:: /includes/driver-examples/driver-example-insert-1.rst

.. tabs-drivers::

Expand Down Expand Up @@ -301,7 +301,7 @@ Insert a Single Document
To retrieve the document that you just inserted, :ref:`query the collection
<document-query-filter>`:

.. include:: /includes/driver-example-insert-2.rst
.. include:: /includes/driver-examples/driver-example-insert-2.rst

.. _write-op-insertMany:

Expand Down Expand Up @@ -467,7 +467,7 @@ Insert Multiple Documents
``_id`` field, the driver adds the ``_id`` field with
an ObjectId value to each document. See :ref:`write-op-insert-behavior`.

.. include:: /includes/driver-example-insert-3.rst
.. include:: /includes/driver-examples/driver-example-insert-3.rst

.. tabs-drivers::

Expand Down Expand Up @@ -584,7 +584,7 @@ Insert Multiple Documents
To retrieve the inserted documents, :ref:`query the collection
<read-operations-query-document>`:

.. include:: /includes/driver-example-query-7.rst
.. include:: /includes/driver-examples/driver-example-query-7.rst

.. _write-op-insert-behavior:

Expand Down
2 changes: 1 addition & 1 deletion source/tutorial/manage-indexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Remove Indexes
Modify an Index
---------------

.. include:: /includes/driver-example-modify-index-tabs.rst
.. include:: /includes/driver-examples/driver-example-modify-index-tabs.rst

.. _rebuild-indexes:

Expand Down
38 changes: 19 additions & 19 deletions source/tutorial/project-fields-from-query-results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ return.

.. |query_operations| replace:: query operations with projection

.. include:: /includes/driver-example-query-intro.rst
.. include:: /includes/driver-examples/driver-example-query-intro.rst

.. include:: /includes/driver-example-query-42.rst
.. include:: /includes/driver-examples/driver-example-query-42.rst

Return All Fields in Matching Documents
---------------------------------------
Expand Down Expand Up @@ -98,7 +98,7 @@ Return All Fields in Matching Documents
The following example returns all fields from all documents in the
``inventory`` collection where the ``status`` equals ``"A"``:

.. include:: /includes/driver-example-query-43.rst
.. include:: /includes/driver-examples/driver-example-query-43.rst

The operation corresponds to the following SQL statement:

Expand All @@ -115,7 +115,7 @@ operation returns all documents that match the query. In the result
set, only the ``item``, ``status`` and, by default, the ``_id`` fields
return in the matching documents.

.. include:: /includes/driver-example-query-44.rst
.. include:: /includes/driver-examples/driver-example-query-44.rst

The operation corresponds to the following SQL statement:

Expand All @@ -130,7 +130,7 @@ You can remove the ``_id`` field from the results by setting its
exclusion ``<field>`` to ``0`` in the projection, as in the
following example:

.. include:: /includes/driver-example-query-45.rst
.. include:: /includes/driver-examples/driver-example-query-45.rst

The operation corresponds to the following SQL statement:

Expand All @@ -146,7 +146,7 @@ can use a projection to exclude specific fields. The following example
which returns all fields except for the ``status`` and the ``instock``
fields in the matching documents:

.. include:: /includes/driver-example-query-46.rst
.. include:: /includes/driver-examples/driver-example-query-46.rst

.. note::

Expand All @@ -169,7 +169,7 @@ The following example returns:

The ``uom`` field remains embedded in the ``size`` document.

.. include:: /includes/driver-example-query-47.rst
.. include:: /includes/driver-examples/driver-example-query-47.rst

Suppress Specific Fields in Embedded Documents
----------------------------------------------
Expand All @@ -182,7 +182,7 @@ The following example specifies a projection to exclude the ``uom``
field inside the ``size`` document. All other fields are returned in
the matching documents:

.. include:: /includes/driver-example-query-48.rst
.. include:: /includes/driver-examples/driver-example-query-48.rst

Projection on Embedded Documents in an Array
--------------------------------------------
Expand All @@ -197,7 +197,7 @@ The following example specifies a projection to return:
- The ``status`` field,
- The ``qty`` field in the documents embedded in the ``instock`` array.

.. include:: /includes/driver-example-query-49.rst
.. include:: /includes/driver-examples/driver-example-query-49.rst

Project Specific Array Elements in the Returned Array
-----------------------------------------------------
Expand All @@ -211,7 +211,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -235,7 +235,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -250,7 +250,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -265,7 +265,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -280,7 +280,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -295,7 +295,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -310,7 +310,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -325,7 +325,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -340,7 +340,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand All @@ -355,7 +355,7 @@ Project Specific Array Elements in the Returned Array

.. include:: /includes/fact-projection-slice-example.rst

.. include:: /includes/driver-example-query-50.rst
.. include:: /includes/driver-examples/driver-example-query-50.rst

:projection:`$elemMatch`, :projection:`$slice`, and
:projection:`$` are the *only* way to project specific elements
Expand Down
20 changes: 10 additions & 10 deletions source/tutorial/query-array-of-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ Query an Array of Embedded Documents

.. |query_operations| replace:: query operations on an array of nested documents

.. include:: /includes/driver-example-query-intro.rst
.. include:: /includes/driver-examples/driver-example-query-intro.rst

.. include:: /includes/driver-example-query-29.rst
.. include:: /includes/driver-examples/driver-example-query-29.rst

Query for a Document Nested in an Array
---------------------------------------

The following example selects all documents where an element in the
``instock`` array matches the specified document:

.. include:: /includes/driver-example-query-30.rst
.. include:: /includes/driver-examples/driver-example-query-30.rst

Equality matches on the whole embedded/nested document require an
*exact* match of the specified document, including the field order. For
example, the following query does not match any documents in the
``inventory`` collection:

.. include:: /includes/driver-example-query-31.rst
.. include:: /includes/driver-examples/driver-example-query-31.rst

Specify a Query Condition on a Field in an Array of Documents
-------------------------------------------------------------
Expand All @@ -50,7 +50,7 @@ The following example selects all documents where the ``instock`` array
has at least one embedded document that contains the field ``qty``
whose value is less than or equal to ``20``:

.. include:: /includes/driver-example-query-33.rst
.. include:: /includes/driver-examples/driver-example-query-33.rst

Use the Array Index to Query for a Field in the Embedded Document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -68,7 +68,7 @@ The following example selects all documents where the ``instock`` array
has as its first element a document that contains the field ``qty``
whose value is less than or equal to ``20``:

.. include:: /includes/driver-example-query-32.rst
.. include:: /includes/driver-examples/driver-example-query-32.rst

Specify Multiple Conditions for Array of Documents
--------------------------------------------------
Expand All @@ -90,13 +90,13 @@ has at least one embedded document that contains both the field
``qty`` equal to ``5`` and the field ``warehouse`` equal
to ``A``:

.. include:: /includes/driver-example-query-34.rst
.. include:: /includes/driver-examples/driver-example-query-34.rst

The following example queries for documents where the ``instock`` array
has at least one embedded document that contains the field ``qty`` that
is greater than ``10`` and less than or equal to ``20``:

.. include:: /includes/driver-example-query-35.rst
.. include:: /includes/driver-examples/driver-example-query-35.rst

Combination of Elements Satisfies the Criteria
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -112,15 +112,15 @@ nested in the ``instock`` array has the ``qty`` field greater than
document) in the array has the ``qty`` field less than or equal to
``20``:

.. include:: /includes/driver-example-query-36.rst
.. include:: /includes/driver-examples/driver-example-query-36.rst

The following example queries for documents where the ``instock`` array
has at least one embedded document that contains the field ``qty``
equal to ``5`` and at least one embedded document (but not necessarily
the same embedded document) that contains the field ``warehouse`` equal
to ``A``:

.. include:: /includes/driver-example-query-37.rst
.. include:: /includes/driver-examples/driver-example-query-37.rst

Additional Query Tutorials
--------------------------
Expand Down
Loading

0 comments on commit 85171fd

Please sign in to comment.