AggregateQuery
Observable for aggregate
- Type parameters:
- TResult
The type of the result.
- Value parameters:
- wrapped
the underlying java AggregateQuery
Value members
Concrete methods
Enables writing to temporary files. A null value indicates that it's unspecified.
Enables writing to temporary files. A null value indicates that it's unspecified.
- Value parameters:
- allowDiskUse
true if writing to temporary files is enabled
- Returns:
this
Sets the number of documents to return per batch.
Sets the number of documents to return per batch.
- Value parameters:
- batchSize
the batch size
- Returns:
this
Sets the bypass document level validation flag.
Sets the bypass document level validation flag.
'''Note:''': This only applies when an $out
stage is specified.
- Value parameters:
- bypassDocumentValidation
If true, allows the write to opt-out of document level validation.
- Returns:
this
- Note:
Requires MongoDB 3.2 or greater
Sets the collation options
Sets the collation options
- Value parameters:
- collation
the collation options to use
- Returns:
this
- Note:
A null value represents the server default.
Requires MongoDB 3.4 or greater
Sets the comment for this operation. A null value means no comment is set.
Sets the comment for this operation. A null value means no comment is set.
- Value parameters:
- comment
the comment
- Returns:
this
- Note:
Requires MongoDB 3.6 or greater
Sets the comment for this operation. A null value means no comment is set.
Sets the comment for this operation. A null value means no comment is set.
- Value parameters:
- comment
the comment
- Returns:
this
- Note:
The comment can be any valid BSON type for server versions 4.4 and above. Server versions between 3.6 and 4.2 only support string as comment, and providing a non-string type will result in a server-side error.
Explain the execution plan for this operation with the server's default verbosity level
Explain the execution plan for this operation with the server's default verbosity level
- Type parameters:
- ExplainResult
The type of the result
- Returns:
the execution plan
- Note:
Requires MongoDB 3.6 or greater
Explain the execution plan for this operation with the given verbosity level
Explain the execution plan for this operation with the given verbosity level
- Type parameters:
- ExplainResult
The type of the result
- Value parameters:
- verbosity
the verbosity of the explanation
- Returns:
the execution plan
- Note:
Requires MongoDB 3.6 or greater
Helper to return a single observable limited to the first result.
Helper to return a single observable limited to the first result.
- Returns:
a single observable which will the first result.
Sets the hint for which index to use. A null value means no hint is set.
Sets the hint for which index to use. A null value means no hint is set.
- Value parameters:
- hint
the hint
- Returns:
this
- Note:
Requires MongoDB 3.6 or greater
Add top-level variables to the aggregation.
Add top-level variables to the aggregation.
For MongoDB 5.0+, the aggregate command accepts a "let" option. This option is a document consisting of zero or more fields representing variables that are accessible to the aggregation pipeline. The key is the name of the variable and the value is a constant in the aggregate expression language. Each parameter name is then usable to access the value of the corresponding expression with the "$$" syntax within aggregate expression contexts which may require the use of '$expr' or a pipeline.
- Value parameters:
- variables
the variables
- Returns:
this
- Note:
Requires MongoDB 5.0 or greater
Sets the maximum await execution time on the server for this operation.
Sets the maximum await execution time on the server for this operation.
- Value parameters:
- duration
the duration
- Returns:
this
- Note:
Requires MongoDB 3.6 or greater
Sets the maximum execution time on the server for this operation.
Sets the maximum execution time on the server for this operation.
- Value parameters:
- duration
the duration
- Returns:
this