MongoDB C++ Driver
mongocxx-3.0.0
|
Class representing the optional arguments to a MongoDB aggregation operation. More...
#include <aggregate.hpp>
Public Member Functions | |
void | allow_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... | |
void | batch_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... | |
void | max_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... | |
void | use_cursor (bool use_cursor) |
Sets whether the results of this aggregation should be returned via a cursor. More... | |
const stdx::optional< bool > & | use_cursor () const |
The current use_cursor setting. More... | |
void | read_preference (class read_preference rp) |
Sets the read_preference for this operation. More... | |
const stdx::optional< class read_preference > & | read_preference () const |
The current read_preference for this operation. More... | |
void | bypass_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... | |
Class representing the optional arguments to a MongoDB aggregation operation.
void mongocxx::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
.
allow_disk_use | Whether or not to allow disk use. |
const stdx::optional<bool>& mongocxx::options::aggregate::allow_disk_use | ( | ) | const |
Retrieves the current allow_disk_use setting.
void mongocxx::options::aggregate::batch_size | ( | std::int32_t | batch_size | ) |
Sets the number of documents to return per batch.
batch_size | The size of the batches to request. |
const stdx::optional<std::int32_t>& mongocxx::options::aggregate::batch_size | ( | ) | const |
The current batch size setting.
void mongocxx::options::aggregate::bypass_document_validation | ( | bool | bypass_document_validation | ) |
Sets whether the $out stage should bypass document validation.
bypass_document_validation | whether or not to bypass validation. |
const stdx::optional<bool>& mongocxx::options::aggregate::bypass_document_validation | ( | ) | const |
The current bypass_document_validation setting.
void mongocxx::options::aggregate::max_time | ( | std::chrono::milliseconds | max_time | ) |
Sets the maximum amount of time for this operation to run server-side in milliseconds.
max_time | The max amount of time (in milliseconds). |
const stdx::optional<std::chrono::milliseconds>& mongocxx::options::aggregate::max_time | ( | ) | const |
The current max_time setting.
void mongocxx::options::aggregate::read_preference | ( | class read_preference | rp | ) |
Sets the read_preference for this operation.
rp | the new read_preference |
const stdx::optional<class read_preference>& mongocxx::options::aggregate::read_preference | ( | ) | const |
The current read_preference for this operation.
void mongocxx::options::aggregate::use_cursor | ( | bool | use_cursor | ) |
Sets whether the results of this aggregation should be returned via a cursor.
If this optional setting is not engaged client-side, the server default will be used.
use_cursor | whether or not to use a cursor |
const stdx::optional<bool>& mongocxx::options::aggregate::use_cursor | ( | ) | const |
The current use_cursor setting.