MongoDB C++ Driver  mongocxx-3.10.2
Public Member Functions | List of all members
mongocxx::v_noabi::options::aggregate Class Reference

Class representing the optional arguments to a MongoDB aggregation operation. More...

#include <aggregate.hpp>

Public Member Functions

aggregateallow_disk_use (bool allow_disk_use)
 Enables writing to temporary files. More...
 
const stdx::optional< bool > & allow_disk_use () const
 Retrieves the current allow_disk_use setting. More...
 
aggregatebatch_size (std::int32_t batch_size)
 Sets the number of documents to return per batch. More...
 
const stdx::optional< std::int32_t > & batch_size () const
 The current batch size setting. More...
 
aggregatecollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this operation. More...
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Retrieves the current collation for this operation. More...
 
aggregatelet (bsoncxx::v_noabi::document::view_or_value let)
 Sets the variable mapping for this operation. More...
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & let () const
 Retrieves the current variable mapping for this operation. More...
 
aggregatemax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run server-side in milliseconds. More...
 
const stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting. More...
 
aggregateread_preference (mongocxx::v_noabi::read_preference rp)
 Sets the read_preference for this operation. More...
 
const stdx::optional< mongocxx::v_noabi::read_preference > & read_preference () const
 The current read_preference for this operation. More...
 
aggregatebypass_document_validation (bool bypass_document_validation)
 Sets whether the $out stage should bypass document validation. More...
 
const stdx::optional< bool > & bypass_document_validation () const
 The current bypass_document_validation setting. More...
 
aggregatehint (mongocxx::v_noabi::hint index_hint)
 Sets the index to use for this operation. More...
 
const stdx::optional< mongocxx::v_noabi::hint > & hint () const
 Gets the current hint. More...
 
aggregatewrite_concern (mongocxx::v_noabi::write_concern write_concern)
 Sets the write concern to use for this operation. More...
 
const stdx::optional< mongocxx::v_noabi::write_concern > & write_concern () const
 Gets the current write concern. More...
 
aggregateread_concern (mongocxx::v_noabi::read_concern read_concern)
 Sets the read concern to use for this operation. More...
 
const stdx::optional< mongocxx::v_noabi::read_concern > & read_concern () const
 Gets the current read concern. More...
 
aggregatecomment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
 Sets the comment to use for this operation. More...
 
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & comment () const
 Gets the current comment. More...
 

Detailed Description

Class representing the optional arguments to a MongoDB aggregation operation.

Member Function Documentation

◆ allow_disk_use() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ batch_size() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ bypass_document_validation() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ comment() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/
Parameters
commentObject representing the comment.
Returns
A reference to the object on which this member function is being called.

◆ hint() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/
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 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ max_time() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ read_concern() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/
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 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ write_concern() [1/2]

const 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ 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
https://www.mongodb.com/docs/manual/reference/command/aggregate/
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: