Skip to content

Commit 85171fd

Browse files
committed
move includes/driver-example-* files into includes/driver-examples/ dir
1 parent b5e4651 commit 85171fd

File tree

74 files changed

+84
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+84
-84
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ composite-pages.yaml
2121
!bin/*/mongodb-domain.yaml
2222
meta.yaml
2323
build
24-
driver-examples/
24+
source/driver-examples/
2525
*~
2626
source/reference/*/*.rst
2727
source/reference/*/*/*.rst

source/indexes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ this index on the ``_id`` field.
6363
Create an Index
6464
---------------
6565

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

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

@@ -231,7 +231,7 @@ Indexes and Collation
231231

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

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

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

source/tutorial/getting-started.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Select All Documents
261261
:ref:`query filter document <document-query-filter>` to the
262262
:node-api:`Collection.find() <Collection.html#find>` method:
263263

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

266266
.. tabs-drivers::
267267

@@ -307,7 +307,7 @@ Select All Documents
307307
selects from the ``inventory`` collection all documents where the
308308
``status`` equals ``"D"``:
309309

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

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

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

321321
.. tabs-drivers::
322322

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

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

341341
.. tabs-drivers::
342342

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

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

361361
.. tabs-drivers::
362362

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

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

382382
.. tabs-drivers::
383383

source/tutorial/insert-documents.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Insert a Single Document
203203
with an ObjectId value to the new document. See
204204
:ref:`write-op-insert-behavior`.
205205

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

208208
.. tabs-drivers::
209209

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

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

306306
.. _write-op-insertMany:
307307

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

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

472472
.. tabs-drivers::
473473

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

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

589589
.. _write-op-insert-behavior:
590590

source/tutorial/manage-indexes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Remove Indexes
4343
Modify an Index
4444
---------------
4545

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

4848
.. _rebuild-indexes:
4949

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ return.
2020

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

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

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

2727
Return All Fields in Matching Documents
2828
---------------------------------------
@@ -98,7 +98,7 @@ Return All Fields in Matching Documents
9898
The following example returns all fields from all documents in the
9999
``inventory`` collection where the ``status`` equals ``"A"``:
100100

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

103103
The operation corresponds to the following SQL statement:
104104

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

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

120120
The operation corresponds to the following SQL statement:
121121

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

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

135135
The operation corresponds to the following SQL statement:
136136

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

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

151151
.. note::
152152

@@ -169,7 +169,7 @@ The following example returns:
169169

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

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

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

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

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

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

202202
Project Specific Array Elements in the Returned Array
203203
-----------------------------------------------------
@@ -211,7 +211,7 @@ Project Specific Array Elements in the Returned Array
211211

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

360360
:projection:`$elemMatch`, :projection:`$slice`, and
361361
:projection:`$` are the *only* way to project specific elements

source/tutorial/query-array-of-documents.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ Query an Array of Embedded Documents
1717

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

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

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

2424
Query for a Document Nested in an Array
2525
---------------------------------------
2626

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

125125
Additional Query Tutorials
126126
--------------------------

0 commit comments

Comments
 (0)