Loading...
Searching...
No Matches
mongocxx::v1::gridfs::bucket::options Class Reference

`#include <mongocxx/v1/gridfs/bucket.hpp>`

## Description

Options for mongocxx::v1::gridfs::bucket.

Supported fields include:

- bucket_name ("bucketName")
- chunk_size_bytes ("chunkSizeBytes")
- read_concern ("readConcern")
- read_preference ("readPreference")
- write_concern ("writeConcern")

See also
  - GridFS (MongoDB Specifications)
  - GridFS for Self-Managed Deployments (MongoDB Manual)

## Public Member Functions

| options ()
| Default initialization.
| options (options &&other) noexcept
| Move constructor.
| options (options const &other)
| Copy construction.
| ~options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | bucket_name () const
| Return the current "bucketName" field.
options & | bucket_name (std::string v)
| Set the "bucketName" field.
bsoncxx::v1::stdx::optional< std::int32_t > | chunk_size_bytes () const
| Return the current "chunkSizeBytes" field.
options & | chunk_size_bytes (std::int32_t v)
| Set the "chunkSizeBytes" field.
options & | operator= (options &&other) noexcept
| Move assignment.
options & | operator= (options const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< v1::read_concern > | read_concern () const
| Return the current "readConcern" field.
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.
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.
options & | write_concern (v1::write_concern v)
| Set the "writeConcern" field.

## Constructor & Destructor Documentation

## ~options()

mongocxx::v1::gridfs::bucket::options::~options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## options() [1/3]

mongocxx::v1::gridfs::bucket::options::options | ( | options && | other | ) |

noexcept

Move constructor.

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

## options() [2/3]

mongocxx::v1::gridfs::bucket::options::options | ( | options const & | other | ) |

Copy construction.

## options() [3/3]

mongocxx::v1::gridfs::bucket::options::options | ( |  | ) |

Default initialization.

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

## Member Function Documentation

## bucket_name() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::gridfs::bucket::options::bucket_name | ( |  | ) | const

Return the current "bucketName" field.

## bucket_name() [2/2]

options & mongocxx::v1::gridfs::bucket::options::bucket_name | ( | std::string | v | ) |

Set the "bucketName" field.

## chunk_size_bytes() [1/2]

bsoncxx::v1::stdx::optional< std::int32_t > mongocxx::v1::gridfs::bucket::options::chunk_size_bytes | ( |  | ) | const

Return the current "chunkSizeBytes" field.

## chunk_size_bytes() [2/2]

options & mongocxx::v1::gridfs::bucket::options::chunk_size_bytes | ( | std::int32_t | v | ) |

Set the "chunkSizeBytes" field.

## operator=() [1/2]

options & mongocxx::v1::gridfs::bucket::options::operator= | ( | options && | other | ) |

noexcept

Move assignment.

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

## operator=() [2/2]

options & mongocxx::v1::gridfs::bucket::options::operator= | ( | options const & | other | ) |

Copy assignment.

## read_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::read_concern > mongocxx::v1::gridfs::bucket::options::read_concern | ( |  | ) | const

Return the current "readConcern" field.

## read_concern() [2/2]

options & mongocxx::v1::gridfs::bucket::options::read_concern | ( | v1::read_concern | v | ) |

Set the "readConcern" field.

## read_preference() [1/2]

bsoncxx::v1::stdx::optional< v1::read_preference > mongocxx::v1::gridfs::bucket::options::read_preference | ( |  | ) | const

Return the current "readPreference" field.

## read_preference() [2/2]

options & mongocxx::v1::gridfs::bucket::options::read_preference | ( | v1::read_preference | v | ) |

Set the "readPreference" field.

## write_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::write_concern > mongocxx::v1::gridfs::bucket::options::write_concern | ( |  | ) | const

Return the current "writeConcern" field.

## write_concern() [2/2]

options & mongocxx::v1::gridfs::bucket::options::write_concern | ( | v1::write_concern | v | ) |

Set the "writeConcern" field.

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

- mongocxx/v1/gridfs/bucket.hpp