Skip to content

Commit a4b172c

Browse files
authored
PHPLIB-663: Document aggregate "let" option (#846)
1 parent 281083f commit a4b172c

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ source:
2828
post: |
2929
.. versionadded:: 1.3
3030
---
31+
source:
32+
file: apiargs-aggregate-option.yaml
33+
ref: let
34+
post: |
35+
.. versionadded:: 1.9
36+
---
3137
source:
3238
file: apiargs-common-option.yaml
3339
ref: maxTimeMS

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ source:
2222
file: apiargs-common-option.yaml
2323
ref: hint
2424
---
25+
source:
26+
file: apiargs-aggregate-option.yaml
27+
ref: let
28+
post: |
29+
.. versionadded:: 1.9
30+
---
2531
source:
2632
file: apiargs-common-option.yaml
2733
ref: maxTimeMS

docs/includes/apiargs-aggregate-option.yaml

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

0 commit comments

Comments
 (0)