Skip to content

Commit 5e42e29

Browse files
committed
Use extracts for option includes
1 parent 77a9799 commit 5e42e29

33 files changed

+270
-116
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ref: bucket-option-readConcern
2+
source:
3+
ref: common-option-readConcern
4+
file: extracts-common-option.yaml
5+
replacement:
6+
object: bucket
7+
---
8+
ref: bucket-option-readPreference
9+
source:
10+
ref: common-option-readPreference
11+
file: extracts-common-option.yaml
12+
replacement:
13+
object: bucket
14+
---
15+
ref: bucket-option-typeMap
16+
source:
17+
ref: common-option-typeMap
18+
file: extracts-common-option.yaml
19+
replacement:
20+
object: bucket
21+
---
22+
ref: bucket-option-writeConcern
23+
source:
24+
ref: common-option-writeConcern
25+
file: extracts-common-option.yaml
26+
replacement:
27+
object: bucket
28+
...
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ref: client-option-readConcern
2+
source:
3+
ref: common-option-readConcern
4+
file: extracts-common-option.yaml
5+
replacement:
6+
object: client
7+
---
8+
ref: client-option-readPreference
9+
source:
10+
ref: common-option-readPreference
11+
file: extracts-common-option.yaml
12+
replacement:
13+
object: client
14+
---
15+
ref: client-option-typeMap
16+
source:
17+
ref: common-option-typeMap
18+
file: extracts-common-option.yaml
19+
replacement:
20+
object: client
21+
---
22+
ref: client-option-writeConcern
23+
source:
24+
ref: common-option-writeConcern
25+
file: extracts-common-option.yaml
26+
replacement:
27+
object: client
28+
...
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
ref: collection-option-collation
2+
source:
3+
ref: common-option-collation
4+
file: extracts-common-option.yaml
5+
post: |
6+
If the collation is unspecified but the collection has a default collation,
7+
the operation uses the collation specified for the collection. If no
8+
collation is specified for the collection or for the operation, MongoDB uses
9+
the simple binary comparison used in prior versions for string comparisons.
10+
---
11+
ref: collection-option-readConcern
12+
source:
13+
ref: common-option-readConcern
14+
file: extracts-common-option.yaml
15+
replacement:
16+
object: collection
17+
---
18+
ref: collection-option-readPreference
19+
source:
20+
ref: common-option-readPreference
21+
file: extracts-common-option.yaml
22+
replacement:
23+
object: collection
24+
---
25+
ref: collection-option-typeMap
26+
source:
27+
ref: common-option-typeMap
28+
file: extracts-common-option.yaml
29+
replacement:
30+
object: collection
31+
---
32+
ref: collection-option-writeConcern
33+
source:
34+
ref: common-option-writeConcern
35+
file: extracts-common-option.yaml
36+
replacement:
37+
object: collection
38+
...
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
ref: common-option-collation
2+
content: |
3+
:manual:`Collation </reference/collation>` allows users to specify
4+
language-specific rules for string comparison, such as rules for lettercase
5+
and accent marks. When specifying collation, the ``locale`` field is
6+
mandatory; all other collation fields are optional. For descriptions of the
7+
fields, see :manual:`Collation Document </reference/collation/#collation-document>`.
8+
---
9+
ref: common-option-comment
10+
content: |
11+
Enables users to specify an arbitrary comment to help trace the operation
12+
through the :manual:`database profiler </reference/database-profiler>`,
13+
:manual:`currentOp </reference/command/currentOp>` output, and
14+
:manual:`logs </reference/log-messages>`.
15+
---
16+
ref: common-option-hint
17+
content: |
18+
The index to use. Specify either the index name as a string or the index key
19+
pattern as a document. If specified, then the query system will only consider
20+
plans using the hinted index.
21+
---
22+
ref: common-option-let
23+
content: |
24+
Map of parameter names and values. Values must be constant or closed
25+
expressions that do not reference document fields. Parameters can then be
26+
accessed as variables in an aggregate expression context (e.g. ``$$var``).
27+
28+
This is not supported for server versions prior to 5.0 and will result in an
29+
exception at execution time if used.
30+
---
31+
ref: common-option-maxTimeMS
32+
content: |
33+
The cumulative time limit in milliseconds for processing operations on the
34+
cursor. MongoDB aborts the operation at the earliest following
35+
:term:`interrupt point`.
36+
---
37+
ref: common-option-readConcern
38+
content: |
39+
:manual:`Read concern </reference/read-concern>` to use for the operation.
40+
Defaults to the {{object}}'s read concern.
41+
replacement:
42+
object: object
43+
---
44+
ref: common-option-readPreference
45+
content: |
46+
:manual:`Read preference </reference/read-preference>` to use for the
47+
operation. Defaults to the {{object}}'s read preference.
48+
replacement:
49+
object: object
50+
---
51+
ref: common-option-session
52+
content: |
53+
Client session to associate with the operation.
54+
---
55+
ref: common-option-typeMap
56+
content: |
57+
The :php:`type map <manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
58+
to apply to cursors, which determines how BSON documents are converted to PHP
59+
values. Defaults to the {{object}}'s type map.
60+
replacement:
61+
object: object
62+
---
63+
ref: common-option-writeConcern
64+
content: |
65+
:manual:`Write concern </reference/write-concern>` to use for the operation.
66+
Defaults to the {{object}}'s write concern.
67+
replacement:
68+
object: object
69+
...
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ref: database-option-readConcern
2+
source:
3+
ref: common-option-readConcern
4+
file: extracts-common-option.yaml
5+
replacement:
6+
object: database
7+
---
8+
ref: database-option-readPreference
9+
source:
10+
ref: common-option-readPreference
11+
file: extracts-common-option.yaml
12+
replacement:
13+
object: database
14+
---
15+
ref: database-option-typeMap
16+
source:
17+
ref: common-option-typeMap
18+
file: extracts-common-option.yaml
19+
replacement:
20+
object: database
21+
---
22+
ref: database-option-writeConcern
23+
source:
24+
ref: common-option-writeConcern
25+
file: extracts-common-option.yaml
26+
replacement:
27+
object: database
28+
...

docs/includes/option-collation.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/includes/option-comment.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/includes/option-maxTimeMS.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/includes/option-readConcern.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/includes/option-readPreference.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/includes/option-session.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/includes/option-typeMap.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/includes/option-writeConcern.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/includes/watch-options.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
* - collation
2424
- array|object
25-
- .. include:: /includes/option-collation.rst
25+
- .. include:: /includes/extracts/common-option-collation.rst
2626

2727
* - comment
2828
- mixed
29-
- .. include:: /includes/option-comment.rst
29+
- .. include:: /includes/extracts/common-option-comment.rst
3030

3131
The comment can be any valid BSON type for server versions 4.4 and above.
3232
Earlier server versions only support string values.
@@ -92,11 +92,11 @@
9292

9393
* - readConcern
9494
- :php:`MongoDB\\Driver\\ReadConcern <class.mongodb-driver-readconcern>`
95-
- .. include:: /includes/option-readConcern.rst
95+
- .. include:: /includes/extracts/common-option-readConcern.rst
9696

9797
* - readPreference
9898
- :php:`MongoDB\\Driver\\ReadPreference <class.mongodb-driver-readpreference>`
99-
- .. include:: /includes/option-readPreference.rst
99+
- .. include:: /includes/extracts/common-option-readPreference.rst
100100

101101
This is used for both the initial change stream aggregation and for
102102
server selection during an automatic resume.
@@ -117,7 +117,7 @@
117117

118118
* - session
119119
- :php:`MongoDB\\Driver\\Session <class.mongodb-driver-session>`
120-
- .. include:: /includes/option-session.rst
120+
- .. include:: /includes/extracts/common-option-session.rst
121121

122122
* - showExpandedEvents
123123
- boolean
@@ -182,4 +182,4 @@
182182

183183
* - typeMap
184184
- array
185-
- .. include:: /includes/option-typeMap.rst
185+
- .. include:: /includes/extracts/common-option-typeMap.rst

docs/reference/method/MongoDBClient-dropDatabase.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ Parameters
3030
``$options`` : array
3131
An array specifying the desired options.
3232

33-
.. |parent| replace:: client
34-
3533
.. list-table::
3634
:header-rows: 1
3735
:widths: 20 20 80
@@ -42,7 +40,7 @@ Parameters
4240

4341
* - comment
4442
- mixed
45-
- .. include:: /includes/option-comment.rst
43+
- .. include:: /includes/extracts/common-option-comment.rst
4644

4745
This is not supported for server versions prior to 4.4 and will result
4846
in an exception at execution time if used.
@@ -51,19 +49,19 @@ Parameters
5149

5250
* - session
5351
- :php:`MongoDB\\Driver\\Session <class.mongodb-driver-session>`
54-
- .. include:: /includes/option-session.rst
52+
- .. include:: /includes/extracts/common-option-session.rst
5553

5654
.. versionadded:: 1.3
5755

5856
* - typeMap
5957
- array
60-
- .. include:: /includes/option-typeMap.rst
58+
- .. include:: /includes/extracts/client-option-typeMap.rst
6159

6260
This will be used for the returned command result document.
6361

6462
* - writeConcern
6563
- :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
66-
- .. include:: /includes/option-writeConcern.rst
64+
- .. include:: /includes/extracts/client-option-writeConcern.rst
6765

6866
Return Values
6967
-------------

docs/reference/method/MongoDBClient-listDatabaseNames.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Parameters
4949

5050
* - comment
5151
- mixed
52-
- .. include:: /includes/option-comment.rst
52+
- .. include:: /includes/extracts/common-option-comment.rst
5353

5454
This is not supported for server versions prior to 4.4 and will result
5555
in an exception at execution time if used.
@@ -67,11 +67,11 @@ Parameters
6767

6868
* - maxTimeMS
6969
- integer
70-
- .. include:: /includes/option-maxTimeMS.rst
70+
- .. include:: /includes/extracts/common-option-maxTimeMS.rst
7171

7272
* - session
7373
- :php:`MongoDB\\Driver\\Session <class.mongodb-driver-session>`
74-
- .. include:: /includes/option-session.rst
74+
- .. include:: /includes/extracts/common-option-session.rst
7575

7676
.. versionadded:: 1.3
7777

docs/reference/method/MongoDBClient-listDatabases.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Parameters
4747

4848
* - comment
4949
- mixed
50-
- .. include:: /includes/option-comment.rst
50+
- .. include:: /includes/extracts/common-option-comment.rst
5151

5252
This is not supported for server versions prior to 4.4 and will result
5353
in an exception at execution time if used.
@@ -65,11 +65,11 @@ Parameters
6565

6666
* - maxTimeMS
6767
- integer
68-
- .. include:: /includes/option-maxTimeMS.rst
68+
- .. include:: /includes/extracts/common-option-maxTimeMS.rst
6969

7070
* - session
7171
- :php:`MongoDB\\Driver\\Session <class.mongodb-driver-session>`
72-
- .. include:: /includes/option-session.rst
72+
- .. include:: /includes/extracts/common-option-session.rst
7373

7474
.. versionadded:: 1.3
7575

docs/reference/method/MongoDBClient-selectCollection.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ Parameters
5757

5858
* - typeMap
5959
- array
60-
- .. |parent| replace:: client
61-
.. include:: /includes/option-typeMap.rst
60+
- The default type map to use for collection operations. Defaults to the
61+
client's type map.
6262

6363
* - writeConcern
6464
- :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
6565
- The default write concern to use for collection operations. Defaults to
66-
to the client's write concern.
66+
the client's write concern.
6767

6868
Return Values
6969
-------------

docs/reference/method/MongoDBClient-selectDatabase.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Parameters
5353

5454
* - typeMap
5555
- array
56-
- .. |parent| replace:: client
57-
.. include:: /includes/option-typeMap.rst
56+
- The default type map to use for database operations. Defaults to the
57+
client's type map.
5858

5959
* - writeConcern
6060
- :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`

docs/reference/method/MongoDBClient-watch.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Parameters
3636
``$options`` : array
3737
An array specifying the desired options.
3838

39-
.. |parent| replace:: client
4039
.. include:: /includes/watch-options.rst
4140

4241
Return Values

0 commit comments

Comments
 (0)