Skip to content

Commit 4889f73

Browse files
PHPLIB-748: Support 'let' option for multiple CRUD commands (#910)
* Updating all necessary classes with new 'let' option support. * Adding actual tests from specifications for "let" option by syncing unified spec tests with mongodb/specifications@1028c34 * Updating tests skips as some features are not yet implemented. * Updating driver version requirements. * Updating Mongo docs. Co-authored-by: Jeremy Mikola <[email protected]>
1 parent f35e9b0 commit 4889f73

15 files changed

+82
-16
lines changed

source/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ post: |
2929
.. versionadded:: 1.3
3030
---
3131
source:
32-
file: apiargs-aggregate-option.yaml
32+
file: apiargs-common-option.yaml
3333
ref: let
3434
post: |
3535
.. versionadded:: 1.9

source/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ source:
22
file: apiargs-MongoDBCollection-common-option.yaml
33
ref: bypassDocumentValidation
44
---
5+
source:
6+
file: apiargs-common-option.yaml
7+
ref: let
8+
post: |
9+
.. versionadded:: 1.13
10+
---
511
arg_name: option
612
name: ordered
713
type: boolean

source/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ post: |
1111
1212
.. versionadded:: 1.7
1313
---
14+
source:
15+
file: apiargs-common-option.yaml
16+
ref: let
17+
post: |
18+
.. versionadded:: 1.13
19+
---
1420
source:
1521
file: apiargs-common-option.yaml
1622
ref: session

source/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ post: |
1111
1212
.. versionadded:: 1.7
1313
---
14+
source:
15+
file: apiargs-common-option.yaml
16+
ref: let
17+
post: |
18+
.. versionadded:: 1.13
19+
---
1420
source:
1521
file: apiargs-common-option.yaml
1622
ref: session

source/includes/apiargs-MongoDBCollection-method-find-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,10 @@ description: |
257257
interface: phpmethod
258258
operation: ~
259259
optional: true
260+
---
261+
source:
262+
file: apiargs-common-option.yaml
263+
ref: let
264+
post: |
265+
.. versionadded:: 1.13
260266
...

source/includes/apiargs-MongoDBCollection-method-findOne-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,10 @@ source:
7575
source:
7676
file: apiargs-MongoDBCollection-method-find-option.yaml
7777
ref: modifiers
78+
---
79+
source:
80+
file: apiargs-common-option.yaml
81+
ref: let
82+
post: |
83+
.. versionadded:: 1.13
7884
...

source/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ post: |
1919
2020
.. versionadded:: 1.7
2121
---
22+
source:
23+
file: apiargs-common-option.yaml
24+
ref: let
25+
post: |
26+
.. versionadded:: 1.13
27+
---
2228
source:
2329
file: apiargs-common-option.yaml
2430
ref: maxTimeMS

source/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ source:
2727
file: apiargs-MongoDBCollection-common-option.yaml
2828
ref: bypassDocumentValidation
2929
---
30+
source:
31+
file: apiargs-common-option.yaml
32+
ref: let
33+
post: |
34+
.. versionadded:: 1.13
35+
---
3036
arg_name: option
3137
name: returnDocument
3238
type: integer

source/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ source:
3333
file: apiargs-MongoDBCollection-common-option.yaml
3434
ref: bypassDocumentValidation
3535
---
36+
source:
37+
file: apiargs-common-option.yaml
38+
ref: let
39+
post: |
40+
.. versionadded:: 1.13
41+
---
3642
arg_name: option
3743
name: returnDocument
3844
type: integer

source/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ post: |
1919
2020
.. versionadded:: 1.6
2121
---
22+
source:
23+
file: apiargs-common-option.yaml
24+
ref: let
25+
post: |
26+
.. versionadded:: 1.13
27+
---
2228
source:
2329
file: apiargs-common-option.yaml
2430
ref: session

source/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ post: |
2525
2626
.. versionadded:: 1.6
2727
---
28+
source:
29+
file: apiargs-common-option.yaml
30+
ref: let
31+
post: |
32+
.. versionadded:: 1.13
33+
---
2834
source:
2935
file: apiargs-common-option.yaml
3036
ref: session

source/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ post: |
2525
2626
.. versionadded:: 1.6
2727
---
28+
source:
29+
file: apiargs-common-option.yaml
30+
ref: let
31+
post: |
32+
.. versionadded:: 1.13
33+
---
2834
source:
2935
file: apiargs-common-option.yaml
3036
ref: session

source/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ source:
2323
ref: hint
2424
---
2525
source:
26-
file: apiargs-aggregate-option.yaml
26+
file: apiargs-common-option.yaml
2727
ref: let
2828
post: |
2929
.. versionadded:: 1.9

source/includes/apiargs-aggregate-option.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,4 @@ description: |
4545
interface: phpmethod
4646
operation: ~
4747
optional: true
48-
---
49-
arg_name: option
50-
name: let
51-
type: array|object
52-
description: |
53-
Map of parameter names and values. Values must be constant or closed
54-
expressions that do not reference document fields. Parameters can then be
55-
accessed as variables in an aggregate expression context (e.g. ``$$var``).
56-
57-
This is not supported for server versions prior to 5.0 and will result in an
58-
exception at execution time if used.
59-
interface: phpmethod
60-
operation: ~
61-
optional: true
6248
...

source/includes/apiargs-common-option.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ operation: ~
2424
optional: true
2525
---
2626
arg_name: option
27+
name: let
28+
type: array|object
29+
description: |
30+
Map of parameter names and values. Values must be constant or closed
31+
expressions that do not reference document fields. Parameters can then be
32+
accessed as variables in an aggregate expression context (e.g. ``$$var``).
33+
34+
This is not supported for server versions prior to 5.0 and will result in an
35+
exception at execution time if used.
36+
interface: phpmethod
37+
operation: ~
38+
optional: true
39+
---
40+
arg_name: option
2741
name: maxTimeMS
2842
type: integer
2943
description: |

0 commit comments

Comments
 (0)