Loading...
Searching...
No Matches
mongocxx::v_noabi::options::aggregate Class Reference

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

## Description

Used by MongoDB aggregation operations.

## Public Member Functions

| aggregate ()=default
| Default initialization.
| aggregate (v1::aggregate_options opts)
| Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bool > const & | allow_disk_use () const
| Retrieves the current allow_disk_use setting.
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`.
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & | batch_size () const
| The current batch size setting.
aggregate & | batch_size (std::int32_t batch_size)
| Sets the number of documents to return per batch.
bsoncxx::v_noabi::stdx::optional< bool > const & | bypass_document_validation () const
| The current bypass_document_validation setting.
aggregate & | bypass_document_validation (bool bypass_document_validation)
| Sets whether the $out stage should bypass document validation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | collation () const
| Retrieves the current collation for this operation.
aggregate & | collation (bsoncxx::v_noabi::document::view_or_value collation)
| Sets the collation for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & | comment () const
| Gets the current comment.
aggregate & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
| Sets the comment to use for this operation.
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & | hint () const
| Gets the current hint.
aggregate & | hint (v_noabi::hint index_hint)
| Sets the index to use for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | let () const
| Retrieves the current variable mapping for this operation.
aggregate & | let (bsoncxx::v_noabi::document::view_or_value let)
| Sets the variable mapping for this operation.
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & | max_time () const
| The current max_time setting.
aggregate & | max_time (std::chrono::milliseconds max_time)
| Sets the maximum amount of time for this operation to run server-side in milliseconds.
| operator v1::aggregate_options () const
| Convert to the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< v_noabi::read_concern > const & | read_concern () const
| Gets the current read concern.
aggregate & | read_concern (v_noabi::read_concern read_concern)
| Sets the read concern to use for this operation.
bsoncxx::v_noabi::stdx::optional< v_noabi::read_preference > const & | read_preference () const
| The current read_preference for this operation.
aggregate & | read_preference (v_noabi::read_preference rp)
| Sets the read_preference for this operation.
bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const & | write_concern () const
| Gets the current write concern.
aggregate & | write_concern (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.

## Constructor & Destructor Documentation

## aggregate() [1/2]

mongocxx::v_noabi::options::aggregate::aggregate | ( |  | ) |

default

Default initialization.

## aggregate() [2/2]

mongocxx::v_noabi::options::aggregate::aggregate | ( | v1::aggregate_options | opts | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## allow_disk_use() [1/2]

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

inline

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 | ) |

inline

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_use | Whether 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]

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

inline

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 | ) |

inline

Sets the number of documents to return per batch.

Parameters

  batch_size | The 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]

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

inline

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 | ) |

inline

Sets whether the $out stage should bypass document validation.

Parameters

  bypass_document_validation | whether 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]

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

inline

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 | ) |

inline

Sets the collation for this operation.

Parameters

  collation | The 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]

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

inline

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 | ) |

inline

Sets the comment to use for this operation.

See also
  - https://www.mongodb.com/docs/manual/reference/command/aggregate/

Parameters

  comment | Object representing the comment.

Returns
  A reference to the object on which this member function is being called.

## hint() [1/2]

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

inline

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 | ( | v_noabi::hint | index_hint | ) |

inline

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_hint | Object 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]

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

inline

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 | ) |

inline

Sets the variable mapping for this operation.

Parameters

  let | The 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]

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

inline

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 | ) |

inline

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

Parameters

  max_time | The 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/

## operator v1::aggregate_options()

mongocxx::v_noabi::options::aggregate::operator v1::aggregate_options | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

## read_concern() [1/2]

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

inline

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 | ( | v_noabi::read_concern | read_concern | ) |

inline

Sets the read concern to use for this operation.

See also
  - https://www.mongodb.com/docs/manual/reference/command/aggregate/

Parameters

  read_concern | Object representing the read_concern.

Returns
  A reference to the object on which this member function is being called.

## read_preference() [1/2]

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

inline

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 | ( | v_noabi::read_preference | rp | ) |

inline

Sets the read_preference for this operation.

Parameters

  rp | the 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]

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

inline

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 | ( | v_noabi::write_concern | write_concern | ) |

inline

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_concern | Object 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:

- mongocxx/v_noabi/mongocxx/options/aggregate.hpp