MongoDB C++ Driver
mongocxx-3.10.2
|
Class representing the optional arguments to a MongoDB createCollection command. More...
#include <create_collection.hpp>
Public Member Functions | |
create_collection_deprecated & | capped (bool capped) |
To create a capped collection, specify true. More... | |
const stdx::optional< bool > & | capped () const |
Gets the current capped setting. More... | |
create_collection_deprecated & | collation (bsoncxx::v_noabi::document::view_or_value collation) |
Sets the default collation for this collection. More... | |
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & | collation () const |
Gets the default collation for this collection. More... | |
create_collection_deprecated & | max (std::int64_t max_documents) |
The maximum number of documents allowed in the capped collection. More... | |
const stdx::optional< std::int64_t > & | max () const |
Gets the current setting for the maximum number of documents allowed in the capped collection. More... | |
create_collection_deprecated & | no_padding (bool no_padding) |
When true, disables the power of 2 sizes allocation for the collection. More... | |
const stdx::optional< bool > & | no_padding () const |
Gets the current value of the "no padding" option for the collection. More... | |
create_collection_deprecated & | size (std::int64_t max_size) |
A maximum size, in bytes, for a capped collection. More... | |
const stdx::optional< std::int64_t > & | size () const |
Gets the current size setting, for a capped collection. More... | |
create_collection_deprecated & | storage_engine (bsoncxx::v_noabi::document::view_or_value storage_engine_opts) |
Specify configuration to the storage on a per-collection basis. More... | |
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & | storage_engine () const |
Gets the current storage engine configuration for this collection. More... | |
create_collection_deprecated & | validation_criteria (mongocxx::v_noabi::validation_criteria validation) |
Specify validation criteria for this collection. More... | |
const stdx::optional< mongocxx::v_noabi::validation_criteria > & | validation_criteria () const |
Gets the current validation criteria for this collection. More... | |
bsoncxx::v_noabi::document::value | to_document () const |
Return a bson document representing the options set on this object. More... | |
operator bsoncxx::v_noabi::document::value () const | |
Class representing the optional arguments to a MongoDB createCollection command.
This class is deprecated, as are the database class methods that use this class. Please use the new database::create_collection methods that take options as a BSON document.
const stdx::optional<bool>& mongocxx::v_noabi::options::create_collection_deprecated::capped | ( | ) | const |
Gets the current capped setting.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::capped | ( | bool | capped | ) |
To create a capped collection, specify true.
capped | Whether or not this collection will be capped. |
const stdx::optional<bsoncxx::v_noabi::document::view_or_value>& mongocxx::v_noabi::options::create_collection_deprecated::collation | ( | ) | const |
Gets the default collation for this collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::collation | ( | bsoncxx::v_noabi::document::view_or_value | collation | ) |
Sets the default collation for this collection.
collation | The default collation for the collection. |
const stdx::optional<std::int64_t>& mongocxx::v_noabi::options::create_collection_deprecated::max | ( | ) | const |
Gets the current setting for the maximum number of documents allowed in the capped collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::max | ( | std::int64_t | max_documents | ) |
The maximum number of documents allowed in the capped collection.
max_documents | Maximum number of documents allowed in the collection (if capped). |
const stdx::optional<bool>& mongocxx::v_noabi::options::create_collection_deprecated::no_padding | ( | ) | const |
Gets the current value of the "no padding" option for the collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::no_padding | ( | bool | no_padding | ) |
When true, disables the power of 2 sizes allocation for the collection.
no_padding | When true, disables power of 2 sizing for this collection. |
mongocxx::v_noabi::options::create_collection_deprecated::operator bsoncxx::v_noabi::document::value | ( | ) | const |
To determine which options are set on this object, use the provided accessors instead.
const stdx::optional<std::int64_t>& mongocxx::v_noabi::options::create_collection_deprecated::size | ( | ) | const |
Gets the current size setting, for a capped collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::size | ( | std::int64_t | max_size | ) |
A maximum size, in bytes, for a capped collection.
max_size | Maximum size, in bytes, of this collection (if capped). |
const stdx::optional<bsoncxx::v_noabi::document::view_or_value>& mongocxx::v_noabi::options::create_collection_deprecated::storage_engine | ( | ) | const |
Gets the current storage engine configuration for this collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::storage_engine | ( | bsoncxx::v_noabi::document::view_or_value | storage_engine_opts | ) |
Specify configuration to the storage on a per-collection basis.
storage_engine_opts | Configuration options specific to the storage engine. |
bsoncxx::v_noabi::document::value mongocxx::v_noabi::options::create_collection_deprecated::to_document | ( | ) | const |
Return a bson document representing the options set on this object.
const stdx::optional<mongocxx::v_noabi::validation_criteria>& mongocxx::v_noabi::options::create_collection_deprecated::validation_criteria | ( | ) | const |
Gets the current validation criteria for this collection.
create_collection_deprecated& mongocxx::v_noabi::options::create_collection_deprecated::validation_criteria | ( | mongocxx::v_noabi::validation_criteria | validation | ) |
Specify validation criteria for this collection.
validation | Validation criteria for this collection. |