MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::options::aggregate Class Reference

#include <mongocxx/v_noabi/mongocxx/options/aggregate.hpp>

Description

Class representing the optional arguments to a MongoDB aggregation operation.

Public Member Functions

const bsoncxx::v_noabi::stdx::optional< bool > & allow_disk_use () const
 Retrieves the current allow_disk_use setting.
 
aggregateallow_disk_use (bool allow_disk_use)
 Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory. The server-side default is false.
 
const bsoncxx::v_noabi::stdx::optional< std::int32_t > & batch_size () const
 The current batch size setting.
 
aggregatebatch_size (std::int32_t batch_size)
 Sets the number of documents to return per batch.
 
const bsoncxx::v_noabi::stdx::optional< bool > & bypass_document_validation () const
 The current bypass_document_validation setting.
 
aggregatebypass_document_validation (bool bypass_document_validation)
 Sets whether the $out stage should bypass document validation.
 
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Retrieves the current collation for this operation.
 
aggregatecollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this operation.
 
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & comment () const
 Gets the current comment.
 
aggregatecomment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
 Sets the comment to use for this operation.
 
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::hint > & hint () const
 Gets the current hint.
 
aggregatehint (mongocxx::v_noabi::hint index_hint)
 Sets the index to use for this operation.
 
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & let () const
 Retrieves the current variable mapping for this operation.
 
aggregatelet (bsoncxx::v_noabi::document::view_or_value let)
 Sets the variable mapping for this operation.
 
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting.
 
aggregatemax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run server-side in milliseconds.
 
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::read_concern > & read_concern () const
 Gets the current read concern.
 
aggregateread_concern (mongocxx::v_noabi::read_concern read_concern)
 Sets the read concern to use for this operation.
 
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::read_preference > & read_preference () const
 The current read_preference for this operation.
 
aggregateread_preference (mongocxx::v_noabi::read_preference rp)
 Sets the read_preference for this operation.
 
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & write_concern () const
 Gets the current write concern.
 
aggregatewrite_concern (mongocxx::v_noabi::write_concern write_concern)
 Sets the write concern to use for this operation. Only has an effect if $out is a part of the pipeline.
 

Member Function Documentation

◆ allow_disk_use() [1/2]

const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::aggregate::allow_disk_use ( ) const

Retrieves the current allow_disk_use setting.

Returns
Whether disk use is allowed.
See also

◆ allow_disk_use() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::allow_disk_use ( bool allow_disk_use)

Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory. The server-side default is false.

Parameters
allow_disk_useWhether or not to allow disk use.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ batch_size() [1/2]

const bsoncxx::v_noabi::stdx::optional< std::int32_t > & mongocxx::v_noabi::options::aggregate::batch_size ( ) const

The current batch size setting.

Returns
The current batch size.
See also

◆ batch_size() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::batch_size ( std::int32_t batch_size)

Sets the number of documents to return per batch.

Parameters
batch_sizeThe size of the batches to request.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ bypass_document_validation() [1/2]

const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::aggregate::bypass_document_validation ( ) const

The current bypass_document_validation setting.

Returns
the current bypass_document_validation setting
See also

◆ bypass_document_validation() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::bypass_document_validation ( bool bypass_document_validation)

Sets whether the $out stage should bypass document validation.

Parameters
bypass_document_validationwhether or not to bypass validation.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ collation() [1/2]

const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::aggregate::collation ( ) const

Retrieves the current collation for this operation.

Returns
The current collation.
See also

◆ collation() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::collation ( bsoncxx::v_noabi::document::view_or_value collation)

Sets the collation for this operation.

Parameters
collationThe new collation.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ comment() [1/2]

const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & mongocxx::v_noabi::options::aggregate::comment ( ) const

Gets the current comment.

Returns
The current comment, if it is set.
See also

◆ comment() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::comment ( bsoncxx::v_noabi::types::bson_value::view_or_value comment)

Sets the comment to use for this operation.

See also
Parameters
commentObject representing the comment.
Returns
A reference to the object on which this member function is being called.

◆ hint() [1/2]

const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::hint > & mongocxx::v_noabi::options::aggregate::hint ( ) const

Gets the current hint.

Returns
The current hint, if one is set.
See also

◆ hint() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::hint ( mongocxx::v_noabi::hint index_hint)

Sets the index to use for this operation.

See also
Note
if the server already has a cached shape for this query, it may ignore a hint.
Parameters
index_hintObject representing the index to use.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ let() [1/2]

const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::aggregate::let ( ) const

Retrieves the current variable mapping for this operation.

Returns
The current variable mapping.
See also

◆ let() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::let ( bsoncxx::v_noabi::document::view_or_value let)

Sets the variable mapping for this operation.

Parameters
letThe new variable mapping.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ max_time() [1/2]

const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & mongocxx::v_noabi::options::aggregate::max_time ( ) const

The current max_time setting.

Returns
The current max time (in milliseconds).
See also

◆ max_time() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::max_time ( std::chrono::milliseconds max_time)

Sets the maximum amount of time for this operation to run server-side in milliseconds.

Parameters
max_timeThe max amount of time (in milliseconds).
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ read_concern() [1/2]

const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::read_concern > & mongocxx::v_noabi::options::aggregate::read_concern ( ) const

Gets the current read concern.

Returns
The current read concern, if it is set.
See also

◆ read_concern() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::read_concern ( mongocxx::v_noabi::read_concern read_concern)

Sets the read concern to use for this operation.

See also
Parameters
read_concernObject representing the read_concern.
Returns
A reference to the object on which this member function is being called.

◆ read_preference() [1/2]

const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::read_preference > & mongocxx::v_noabi::options::aggregate::read_preference ( ) const

The current read_preference for this operation.

Returns
the current read_preference
See also

◆ read_preference() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::read_preference ( mongocxx::v_noabi::read_preference rp)

Sets the read_preference for this operation.

Parameters
rpthe new read_preference
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also

◆ write_concern() [1/2]

const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::aggregate::write_concern ( ) const

Gets the current write concern.

Returns
The current write concern, if it is set.
See also

◆ write_concern() [2/2]

aggregate & mongocxx::v_noabi::options::aggregate::write_concern ( mongocxx::v_noabi::write_concern write_concern)

Sets the write concern to use for this operation. Only has an effect if $out is a part of the pipeline.

See also
Parameters
write_concernObject representing the write_concern.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

The documentation for this class was generated from the following file: