Skip to content

Commit 32a1cf8

Browse files
PHPLIB-749: Support comment option on command helpers (#925)
Co-authored-by: Jeremy Mikola <[email protected]>
1 parent 1ee1243 commit 32a1cf8

File tree

82 files changed

+679
-177
lines changed

Some content is hidden

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

82 files changed

+679
-177
lines changed

Diff for: docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-common-option.yaml
312
ref: session

Diff for: docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ interface: phpmethod
1313
operation: ~
1414
optional: true
1515
---
16+
source:
17+
file: apiargs-common-option.yaml
18+
ref: comment
19+
post: |
20+
This is not supported for server versions prior to 4.4 and will result in an
21+
exception at execution time if used.
22+
23+
.. versionadded:: 1.13
24+
---
1625
arg_name: option
1726
name: filter
1827
type: array|object

Diff for: docs/includes/apiargs-MongoDBClient-method-watch-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ source:
77
file: apiargs-common-option.yaml
88
ref: collation
99
---
10+
source:
11+
file: apiargs-common-option.yaml
12+
ref: comment
13+
post: |
14+
The comment can be any valid BSON type for server versions 4.4 and above.
15+
Earlier server versions only support string values.
16+
17+
.. versionadded:: 1.13
18+
---
1019
source:
1120
file: apiargs-method-watch-option.yaml
1221
ref: fullDocument

Diff for: docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ source:
1111
ref: bypassDocumentValidation
1212
---
1313
source:
14-
file: apiargs-aggregate-option.yaml
14+
file: apiargs-common-option.yaml
1515
ref: comment
1616
post: |
17+
The comment can be any valid BSON type for server versions 4.4 and above.
18+
Earlier server versions only support string values.
19+
1720
.. versionadded:: 1.3
1821
---
1922
source:

Diff for: docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: bypassDocumentValidation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-common-option.yaml
716
ref: let

Diff for: docs/includes/apiargs-MongoDBCollection-method-count-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: collation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
arg_name: option
615
name: hint
716
type: string|array|object

Diff for: docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: collation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
The comment can be any valid BSON type for server versions 4.4 and above.
10+
Earlier server versions only support string values.
11+
---
512
arg_name: option
613
name: hint
714
type: string|array|object

Diff for: docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ interface: phpmethod
1717
operation: ~
1818
optional: true
1919
---
20+
source:
21+
file: apiargs-common-option.yaml
22+
ref: comment
23+
post: |
24+
This is not supported for server versions prior to 4.4 and will result in an
25+
exception at execution time if used.
26+
27+
.. versionadded:: 1.13
28+
---
2029
arg_name: option
2130
name: unique
2231
type: boolean

Diff for: docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-MongoDBCollection-method-createIndex-option.yaml
312
ref: commitQuorum

Diff for: docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: collation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-common-option.yaml
716
ref: hint

Diff for: docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: collation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-common-option.yaml
716
ref: hint

Diff for: docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: collation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-common-option.yaml
716
ref: maxTimeMS

Diff for: docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-dropCollection-option.yaml
312
ref: encryptedFields

Diff for: docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-common-option.yaml
312
ref: maxTimeMS

Diff for: docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-common-option.yaml
312
ref: maxTimeMS

Diff for: docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-common-option.yaml
312
ref: maxTimeMS

Diff for: docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
Defaults to the ``comment`` of the explained operation (if any).
6+
7+
This is not supported for server versions prior to 4.4 and will result in an
8+
exception at execution time if used.
9+
10+
.. versionadded:: 1.13
11+
---
112
source:
213
file: apiargs-MongoDBCollection-common-option.yaml
314
ref: readPreference

Diff for: docs/includes/apiargs-MongoDBCollection-method-find-option.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,12 @@ source:
7474
file: apiargs-MongoDBCollection-common-option.yaml
7575
ref: collation
7676
---
77-
arg_name: option
78-
name: comment
79-
type: string
80-
description: |
81-
A comment to attach to the query to help interpret and trace query
82-
:dbcommand:`profile` data.
83-
interface: phpmethod
84-
operation: ~
85-
optional: true
77+
source:
78+
file: apiargs-common-option.yaml
79+
ref: comment
80+
post: |
81+
The comment can be any valid BSON type for server versions 4.4 and above.
82+
Earlier server versions only support string values.
8683
---
8784
arg_name: option
8885
name: cursorType

Diff for: docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ source:
1010
file: apiargs-MongoDBCollection-common-option.yaml
1111
ref: collation
1212
---
13+
source:
14+
file: apiargs-common-option.yaml
15+
ref: comment
16+
post: |
17+
This is not supported for server versions prior to 4.4 and will result in an
18+
exception at execution time if used.
19+
20+
.. versionadded:: 1.13
21+
---
1322
source:
1423
file: apiargs-common-option.yaml
1524
ref: hint

Diff for: docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ source:
1010
file: apiargs-MongoDBCollection-common-option.yaml
1111
ref: collation
1212
---
13+
source:
14+
file: apiargs-common-option.yaml
15+
ref: comment
16+
post: |
17+
This is not supported for server versions prior to 4.4 and will result in an
18+
exception at execution time if used.
19+
20+
.. versionadded:: 1.13
21+
---
1322
source:
1423
file: apiargs-common-option.yaml
1524
ref: hint

Diff for: docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ source:
1616
file: apiargs-MongoDBCollection-common-option.yaml
1717
ref: collation
1818
---
19+
source:
20+
file: apiargs-common-option.yaml
21+
ref: comment
22+
post: |
23+
This is not supported for server versions prior to 4.4 and will result in an
24+
exception at execution time if used.
25+
26+
.. versionadded:: 1.13
27+
---
1928
source:
2029
file: apiargs-common-option.yaml
2130
ref: hint

Diff for: docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: bypassDocumentValidation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml
716
ref: ordered

Diff for: docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: bypassDocumentValidation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: comment
8+
post: |
9+
This is not supported for server versions prior to 4.4 and will result in an
10+
exception at execution time if used.
11+
12+
.. versionadded:: 1.13
13+
---
514
source:
615
file: apiargs-common-option.yaml
716
ref: session

Diff for: docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-common-option.yaml
312
ref: maxTimeMS

Diff for: docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ source:
88
file: apiargs-MongoDBCollection-common-option.yaml
99
ref: collation
1010
---
11+
source:
12+
file: apiargs-common-option.yaml
13+
ref: comment
14+
post: |
15+
This is not supported for server versions prior to 4.4 and will result in an
16+
exception at execution time if used.
17+
18+
.. versionadded:: 1.13
19+
---
1120
arg_name: option
1221
name: finalize
1322
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`

Diff for: docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: comment
4+
post: |
5+
This is not supported for server versions prior to 4.4 and will result in an
6+
exception at execution time if used.
7+
8+
.. versionadded:: 1.13
9+
---
110
source:
211
file: apiargs-MongoDBCollection-common-option.yaml
312
ref: typeMap

0 commit comments

Comments
 (0)