Skip to content

Commit 3475092

Browse files
authored
DOCSP-33452: V1 cleanup (#53)
1 parent c498630 commit 3475092

File tree

13 files changed

+91
-56
lines changed

13 files changed

+91
-56
lines changed

source/fundamentals/aggregation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ API Documentation
259259
~~~~~~~~~~~~~~~~~
260260

261261
To learn more about any of the methods or types discussed in this
262-
guide, see the following API Documentation:
262+
guide, see the following API documentation:
263263

264264
- `aggregate() <{+api+}/struct.Collection.html#method.aggregate>`__
265265
- `AggregateOptions <{+api+}/options/struct.AggregateOptions.html>`__

source/fundamentals/authentication.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ API Documentation
322322
~~~~~~~~~~~~~~~~~
323323

324324
To learn more about the methods and types discussed in this
325-
guide, see the following API Documentation:
325+
guide, see the following API documentation:
326326

327327
- `Credential <{+api+}/options/struct.Credential.html>`__
328328
- `ClientOptions <{+api+}/options/struct.ClientOptions.html>`__

source/fundamentals/crud/compound-operations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ API Documentation
526526
~~~~~~~~~~~~~~~~~
527527

528528
To learn more about the methods and types discussed in this
529-
guide, see the following API Documentation:
529+
guide, see the following API documentation:
530530

531531
- `find_one_and_delete() <{+api+}/struct.Collection.html#method.find_one_and_delete>`__
532532
- `FindOneAndDeleteOptions <{+api+}/options/struct.FindOneAndDeleteOptions.html>`__

source/fundamentals/crud/read-operations/cursor.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,13 @@ the method that returns the ``Cursor`` instance. For example, you can
243243
specify cursor-related options in a ``FindOptions`` type that you pass to the
244244
``find()`` method.
245245

246+
.. note:: Instantiating Options
247+
248+
The {+driver-short+} implements the Builder design pattern for the
249+
creation of many different types, including ``FindOptions``. You can
250+
use each type's ``builder()`` method to construct an options instance
251+
by chaining option builder functions one at a time.
252+
246253
The following table describes cursor-related options that you can set in
247254
an options instance:
248255

source/fundamentals/crud/read-operations/query.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ API Documentation
394394
~~~~~~~~~~~~~~~~~
395395

396396
To learn more about any of the methods or types used in this
397-
guide, see the following API Documentation:
397+
guide, see the following API documentation:
398398

399399
- `find() <{+api+}/struct.Collection.html#method.find>`__
400400
- `Cursor <{+api+}/struct.Cursor.html>`__

source/fundamentals/crud/read-operations/retrieve.txt

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,8 @@ following parameters:
206206
:language: console
207207
:visible: false
208208

209-
{
210-
"_id": { ... },
211-
"item": "watering can",
212-
"category": "garden",
213-
"unit_price": 11.99
214-
}
215-
{
216-
"_id": { ... },
217-
"item": "candle",
218-
"category": "decor",
219-
"unit_price": 2.89
220-
}
209+
{ "_id": { ... }, "item": "watering can", "category": "garden", "unit_price": 11.99 }
210+
{ "_id": { ... }, "item": "candle", "category": "decor", "unit_price": 2.89 }
221211

222212
.. _rust-find-one-example:
223213

@@ -244,12 +234,22 @@ following parameters:
244234
:language: console
245235
:visible: false
246236

247-
{
248-
"_id": { ... },
249-
"item": "watering can",
250-
"category": "garden",
251-
"unit_price": 11.99
252-
}
237+
Some(
238+
Document({
239+
"_id": ObjectId(
240+
"...",
241+
),
242+
"item": String(
243+
"watering can",
244+
),
245+
"category": String(
246+
"garden",
247+
),
248+
"unit_price": Double(
249+
11.99,
250+
),
251+
}),
252+
)
253253

254254
.. _rust-retrieve-aggregation:
255255

@@ -356,18 +356,9 @@ pipeline that contains the following stages:
356356
:language: console
357357
:visible: false
358358

359-
{
360-
"_id": { "category": "garden" },
361-
"avg_price": 11.99
362-
}
363-
{
364-
"_id": { "category": "decor" },
365-
"avg_price": 2.89
366-
}
367-
{
368-
"_id": { "category": "kitchen" },
369-
"avg_price": 20.84
370-
}
359+
{ "_id": { "category": "garden" }, "avg_price": 11.99 }
360+
{ "_id": { "category": "decor" }, "avg_price": 2.89 }
361+
{ "_id": { "category": "kitchen" }, "avg_price": 20.84 }
371362

372363
.. _rust-crud-retrieve-addtl-info:
373364

@@ -397,7 +388,7 @@ API Documentation
397388
~~~~~~~~~~~~~~~~~
398389

399390
To learn more about the methods and types discussed in this
400-
guide, see the following API Documentation:
391+
guide, see the following API documentation:
401392

402393
- `find_one() <{+api+}/struct.Collection.html#method.find_one>`__
403394
- `find() <{+api+}/struct.Collection.html#method.find>`__

source/fundamentals/crud/write-operations/change.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,16 @@ Modify Update and Replace Behavior
338338

339339
You can modify the behavior of the ``update_one()``, ``update_many``,
340340
and ``replace_one()`` methods by constructing and passing an
341-
``UpdateOptions`` struct as a parameter. The following table describes
342-
the options available in ``UpdateOptions``:
341+
``UpdateOptions`` struct as a parameter.
342+
343+
.. note:: Instantiating Options
344+
345+
The {+driver-short+} implements the Builder design pattern for the
346+
creation of many different types, including ``UpdateOptions``. You
347+
can use each type's ``builder()`` method to construct an options
348+
instance by chaining option builder functions one at a time.
349+
350+
The following table describes the options available in ``UpdateOptions``:
343351

344352
.. list-table::
345353
:header-rows: 1
@@ -441,7 +449,7 @@ API Documentation
441449
~~~~~~~~~~~~~~~~~
442450

443451
To learn more about any of the methods or types discussed in this
444-
guide, see the following API Documentation:
452+
guide, see the following API documentation:
445453

446454
- `update_one() <{+api+}/struct.Collection.html#method.update_one>`__
447455
- `update_many() <{+api+}/struct.Collection.html#method.update_many>`__

source/fundamentals/crud/write-operations/delete.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ either method. You can specify settings in a ``DeleteOptions`` instance
6464
to configure the delete operation. To use default values for each
6565
setting, specify the value ``None`` as the options parameter.
6666

67+
.. note:: Instantiating Options
68+
69+
The {+driver-short+} implements the Builder design pattern for the
70+
creation of many different types, including ``DeleteOptions``. You
71+
can use each type's ``builder()`` method to construct an options
72+
instance by chaining option builder functions one at a time.
73+
6774
The following table describes settings that you can specify in a
6875
``DeleteOptions`` instance:
6976

@@ -181,7 +188,7 @@ API Documentation
181188
~~~~~~~~~~~~~~~~~
182189

183190
To learn more about any of the methods or types discussed in this
184-
guide, see the following API Documentation:
191+
guide, see the following API documentation:
185192

186193
- `delete_one() <{+api+}/struct.Collection.html#method.delete_one>`__
187194
- `delete_many() <{+api+}/struct.Collection.html#method.delete_many>`__

source/fundamentals/crud/write-operations/insert.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,16 @@ Modify insert_one Behavior
106106
~~~~~~~~~~~~~~~~~~~~~~~~~~
107107

108108
You can modify the behavior of the ``insert_one()`` method by
109-
constructing and passing an ``InsertOneOptions`` struct. The
110-
following table describes the options available in
111-
``InsertOneOptions``:
109+
constructing and passing an ``InsertOneOptions`` struct.
110+
111+
.. note:: Instantiating Options
112+
113+
The {+driver-short+} implements the Builder design pattern for the
114+
creation of many different types, including ``InsertOneOptions``.
115+
You can use each type's ``builder()`` method to construct an options
116+
instance by chaining option builder functions one at a time.
117+
118+
The following table describes the options available in ``InsertOneOptions``:
112119

113120
.. list-table::
114121
:header-rows: 1
@@ -312,7 +319,7 @@ API Documentation
312319
~~~~~~~~~~~~~~~~~
313320

314321
To learn more about any of the methods or types discussed in this
315-
guide, see the following API Documentation:
322+
guide, see the following API documentation:
316323

317324
- `insert_one() <{+api+}/struct.Collection.html#method.insert_one>`__
318325
- `InsertOneResult <{+api+}/results/struct.InsertOneResult.html>`__

source/fundamentals/schema-validation.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ in an instance of ``CreateCollectionOptions`` to the ``create_collection()``
5858
method. You can build a ``CreateCollectionOptions`` instance by using the
5959
``CreateCollectionOptions::builder()`` method.
6060

61+
.. note:: Instantiating Options
62+
63+
The {+driver-short+} implements the Builder design pattern for the
64+
creation of many different types, including ``CreateCollectionOptions``.
65+
You can use each type's ``builder()`` method to construct an options
66+
instance by chaining option builder functions one at a time.
67+
6168
Call the following ``CreateCollectionOptions::builder()`` functions to specify
6269
the validation options for the new collection:
6370

@@ -178,7 +185,7 @@ API Documentation
178185
~~~~~~~~~~~~~~~~~
179186

180187
To learn more about setting validation levels and actions, see the
181-
following API Documentation:
188+
following API documentation:
182189

183190
- `validation_level <{+api+}/options/struct.CreateCollectionOptions.html#structfield.validation_level>`__
184191
for the ``validation_level()`` helper method

0 commit comments

Comments
 (0)