MongoDB C++ Driver mongocxx-3.11.0
|
#include <mongocxx/v_noabi/mongocxx/options/gridfs/bucket.hpp>
Class representing the optional arguments to a MongoDB GridFS bucket creation operation.
Public Member Functions | |
const stdx::optional< std::string > & | bucket_name () const |
Gets the name of the bucket. | |
bucket & | bucket_name (std::string bucket_name) |
Sets the name of the bucket. Defaults to 'fs'. | |
const stdx::optional< std::int32_t > & | chunk_size_bytes () const |
Gets the size of the chunks in the bucket. | |
bucket & | chunk_size_bytes (std::int32_t chunk_size_bytes) |
Sets the size of the chunks in the bucket. This will be used as the chunk size for files uploaded through the bucket without a custom size specified. Defaults to 255KB (255 * 1024). | |
const stdx::optional< mongocxx::v_noabi::read_concern > & | read_concern () const |
Gets the read concern of the bucket. | |
bucket & | read_concern (mongocxx::v_noabi::read_concern read_concern) |
Sets the read concern to be used when reading from the bucket. Defaults to the read concern of the database containing the bucket's collections. | |
const stdx::optional< mongocxx::v_noabi::read_preference > & | read_preference () const |
Gets the read preference of the bucket. | |
bucket & | read_preference (mongocxx::v_noabi::read_preference read_preference) |
Sets the read preference to be used when reading from the GridFS bucket. Defaults to the read preference of the database containing the bucket's collections. | |
const stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
Gets the write concern of the bucket. | |
bucket & | write_concern (mongocxx::v_noabi::write_concern write_concern) |
Sets the write concern to be used when writing to the GridFS bucket. Defaults to the write concern of the database containing the bucket's collections. | |
const stdx::optional< std::string > & mongocxx::v_noabi::options::gridfs::bucket::bucket_name | ( | ) | const |
Gets the name of the bucket.
bucket & mongocxx::v_noabi::options::gridfs::bucket::bucket_name | ( | std::string | bucket_name | ) |
Sets the name of the bucket. Defaults to 'fs'.
bucket_name | The name of the bucket. |
const stdx::optional< std::int32_t > & mongocxx::v_noabi::options::gridfs::bucket::chunk_size_bytes | ( | ) | const |
Gets the size of the chunks in the bucket.
bucket & mongocxx::v_noabi::options::gridfs::bucket::chunk_size_bytes | ( | std::int32_t | chunk_size_bytes | ) |
Sets the size of the chunks in the bucket. This will be used as the chunk size for files uploaded through the bucket without a custom size specified. Defaults to 255KB (255 * 1024).
chunk_size_bytes | The size of the chunks in bytes. |
const stdx::optional< mongocxx::v_noabi::read_concern > & mongocxx::v_noabi::options::gridfs::bucket::read_concern | ( | ) | const |
Gets the read concern of the bucket.
bucket & mongocxx::v_noabi::options::gridfs::bucket::read_concern | ( | mongocxx::v_noabi::read_concern | read_concern | ) |
Sets the read concern to be used when reading from the bucket. Defaults to the read concern of the database containing the bucket's collections.
read_concern | The read concern of the bucket. |
const stdx::optional< mongocxx::v_noabi::read_preference > & mongocxx::v_noabi::options::gridfs::bucket::read_preference | ( | ) | const |
Gets the read preference of the bucket.
bucket & mongocxx::v_noabi::options::gridfs::bucket::read_preference | ( | mongocxx::v_noabi::read_preference | read_preference | ) |
Sets the read preference to be used when reading from the GridFS bucket. Defaults to the read preference of the database containing the bucket's collections.
read_preference | The read preference of the GridFS bucket. |
const stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::gridfs::bucket::write_concern | ( | ) | const |
Gets the write concern of the bucket.
bucket & mongocxx::v_noabi::options::gridfs::bucket::write_concern | ( | mongocxx::v_noabi::write_concern | write_concern | ) |
Sets the write concern to be used when writing to the GridFS bucket. Defaults to the write concern of the database containing the bucket's collections.
write_concern | The write concern of the GridFS bucket. |