Loading...
Searching...
No Matches
mongocxx::v1::aggregate_options Class Reference

`#include <mongocxx/v1/aggregate_options.hpp>`

## Description

Options for an "aggregate" command.

Supported fields include:

- allow_disk_use ("allowDiskUse")
- batch_size ("batchSize")
- bypass_document_validation ("bypassDocumentValidation")
- collation
- comment
- hint
- let
- max_time ("maxTimeMS")
- read_concern ("readConcern")
- read_preference ("readPreference")
- write_concern ("writeConcern")

See also
  - aggregate (database command) (MongoDB Manual)

## Public Member Functions

| aggregate_options ()
| Default initialization.
| aggregate_options (aggregate_options &&other) noexcept
| Move constructor.
| aggregate_options (aggregate_options const &other)
| Copy construction.
| ~aggregate_options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bool > | allow_disk_use () const
| Return the current "allowDiskUse" field.
aggregate_options & | allow_disk_use (bool v)
| Set the "allowDiskUse" field.
bsoncxx::v1::stdx::optional< std::int32_t > | batch_size () const
| Return the current "batchSize" field.
aggregate_options & | batch_size (std::int32_t v)
| Set the "batchSize" field.
bsoncxx::v1::stdx::optional< bool > | bypass_document_validation () const
| Return the current "bypassDocumentValidation" field.
aggregate_options & | bypass_document_validation (bool v)
| Set the "bypassDocumentValidation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | collation () const
| Return the current "collation" field.
aggregate_options & | collation (bsoncxx::v1::document::value v)
| Set the "collation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > | comment () const
| Return the current "comment" field.
aggregate_options & | comment (bsoncxx::v1::types::value v)
| Set the "comment" field.
bsoncxx::v1::stdx::optional< v1::hint > | hint () const
| Return the current "hint" field.
aggregate_options & | hint (v1::hint v)
| Set the "hint" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | let () const
| Return the current "let" field.
aggregate_options & | let (bsoncxx::v1::document::value v)
| Set the "let" field.
bsoncxx::v1::stdx::optional< std::chrono::milliseconds > | max_time () const
| Return the current "maxTimeMS" field.
aggregate_options & | max_time (std::chrono::milliseconds v)
| Set the "maxTimeMS" field.
aggregate_options & | operator= (aggregate_options &&other) noexcept
| Move assignment.
aggregate_options & | operator= (aggregate_options const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< v1::read_concern > | read_concern () const
| Return the current "readConcern" field.
aggregate_options & | read_concern (v1::read_concern v)
| Set the "readConcern" field.
bsoncxx::v1::stdx::optional< v1::read_preference > | read_preference () const
| Return the current "readPreference" field.
aggregate_options & | read_preference (v1::read_preference v)
| Set the "readPreference" field.
bsoncxx::v1::stdx::optional< v1::write_concern > | write_concern () const
| Return the current "writeConcern" field.
aggregate_options & | write_concern (v1::write_concern v)
| Set the "writeConcern" field.

## Constructor & Destructor Documentation

## ~aggregate_options()

mongocxx::v1::aggregate_options::~aggregate_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## aggregate_options() [1/3]

mongocxx::v1::aggregate_options::aggregate_options | ( | aggregate_options && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## aggregate_options() [2/3]

mongocxx::v1::aggregate_options::aggregate_options | ( | aggregate_options const & | other | ) |

Copy construction.

## aggregate_options() [3/3]

mongocxx::v1::aggregate_options::aggregate_options | ( |  | ) |

Default initialization.

Postconditions:
  - All supported fields are "unset" or zero-initialized.

## Member Function Documentation

## allow_disk_use() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::aggregate_options::allow_disk_use | ( |  | ) | const

Return the current "allowDiskUse" field.

## allow_disk_use() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::allow_disk_use | ( | bool | v | ) |

Set the "allowDiskUse" field.

## batch_size() [1/2]

bsoncxx::v1::stdx::optional< std::int32_t > mongocxx::v1::aggregate_options::batch_size | ( |  | ) | const

Return the current "batchSize" field.

## batch_size() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::batch_size | ( | std::int32_t | v | ) |

Set the "batchSize" field.

## bypass_document_validation() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::aggregate_options::bypass_document_validation | ( |  | ) | const

Return the current "bypassDocumentValidation" field.

## bypass_document_validation() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::bypass_document_validation | ( | bool | v | ) |

Set the "bypassDocumentValidation" field.

## collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::aggregate_options::collation | ( |  | ) | const

Return the current "collation" field.

## collation() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::collation | ( | bsoncxx::v1::document::value | v | ) |

Set the "collation" field.

## comment() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > mongocxx::v1::aggregate_options::comment | ( |  | ) | const

Return the current "comment" field.

## comment() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::comment | ( | bsoncxx::v1::types::value | v | ) |

Set the "comment" field.

## hint() [1/2]

bsoncxx::v1::stdx::optional< v1::hint > mongocxx::v1::aggregate_options::hint | ( |  | ) | const

Return the current "hint" field.

## hint() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::hint | ( | v1::hint | v | ) |

Set the "hint" field.

## let() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::aggregate_options::let | ( |  | ) | const

Return the current "let" field.

## let() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::let | ( | bsoncxx::v1::document::value | v | ) |

Set the "let" field.

## max_time() [1/2]

bsoncxx::v1::stdx::optional< std::chrono::milliseconds > mongocxx::v1::aggregate_options::max_time | ( |  | ) | const

Return the current "maxTimeMS" field.

## max_time() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::max_time | ( | std::chrono::milliseconds | v | ) |

Set the "maxTimeMS" field.

## operator=() [1/2]

aggregate_options & mongocxx::v1::aggregate_options::operator= | ( | aggregate_options && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::operator= | ( | aggregate_options const & | other | ) |

Copy assignment.

## read_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::read_concern > mongocxx::v1::aggregate_options::read_concern | ( |  | ) | const

Return the current "readConcern" field.

## read_concern() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::read_concern | ( | v1::read_concern | v | ) |

Set the "readConcern" field.

## read_preference() [1/2]

bsoncxx::v1::stdx::optional< v1::read_preference > mongocxx::v1::aggregate_options::read_preference | ( |  | ) | const

Return the current "readPreference" field.

## read_preference() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::read_preference | ( | v1::read_preference | v | ) |

Set the "readPreference" field.

## write_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::write_concern > mongocxx::v1::aggregate_options::write_concern | ( |  | ) | const

Return the current "writeConcern" field.

## write_concern() [2/2]

aggregate_options & mongocxx::v1::aggregate_options::write_concern | ( | v1::write_concern | v | ) |

Set the "writeConcern" field.

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

- mongocxx/v1/aggregate_options.hpp