Class representing the optional arguments to a MongoDB createCollection command.
More...
#include <create_collection.hpp>
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.
◆ capped() [1/2]
const stdx::optional<bool>& mongocxx::options::create_collection_deprecated::capped |
( |
| ) |
const |
◆ capped() [2/2]
◆ collation() [1/2]
◆ collation() [2/2]
Sets the default collation for this collection.
- Parameters
-
collation | The default collation for the collection. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
- See also
- https://docs.mongodb.com/manual/reference/collation/
◆ max() [1/2]
const stdx::optional<std::int64_t>& mongocxx::options::create_collection_deprecated::max |
( |
| ) |
const |
Gets the current setting for the maximum number of documents allowed in the capped collection.
- Returns
- Maximum number of documents allowed in the collection (if capped).
◆ max() [2/2]
The maximum number of documents allowed in the capped collection.
- Note
- The size limit takes precedence over this limit. If a capped collection reaches the size limit before it reaches the maximum number of documents, MongoDB removes old documents.
- Parameters
-
max_documents | Maximum number of documents allowed in the collection (if capped). |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ no_padding() [1/2]
const stdx::optional<bool>& mongocxx::options::create_collection_deprecated::no_padding |
( |
| ) |
const |
◆ no_padding() [2/2]
When true, disables the power of 2 sizes allocation for the collection.
- See also
- https://docs.mongodb.com/manual/reference/command/create/
- Parameters
-
no_padding | When true, disables power of 2 sizing for this collection. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ operator bsoncxx::document::value()
- Deprecated:
- This method is deprecated.
To determine which options are set on this object, use the provided accessors instead.
◆ size() [1/2]
const stdx::optional<std::int64_t>& mongocxx::options::create_collection_deprecated::size |
( |
| ) |
const |
Gets the current size setting, for a capped collection.
- Returns
- Maximum size, in bytes, of this collection (if capped).
◆ size() [2/2]
A maximum size, in bytes, for a capped collection.
- Note
- Once a capped collection reaches its maximum size, MongoDB removes older documents to make space for new documents.
-
Size is required for capped collections and ignored for other collections.
- Parameters
-
max_size | Maximum size, in bytes, of this collection (if capped). |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ storage_engine() [1/2]
Gets the current storage engine configuration for this collection.
- Returns
- Configuration options specific to the storage engine.
◆ storage_engine() [2/2]
Specify configuration to the storage on a per-collection basis.
- Note
- This option is currently only available with the WiredTiger storage engine.
- Parameters
-
storage_engine_opts | Configuration options specific to the storage engine. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ to_document()
Return a bson document representing the options set on this object.
- Deprecated:
- This method is deprecated. To determine which options are set on this object, use the provided accessors instead.
- Returns
- Options, as a document.
◆ validation_criteria() [1/2]
const stdx::optional<class validation_criteria>& mongocxx::options::create_collection_deprecated::validation_criteria |
( |
| ) |
const |
◆ validation_criteria() [2/2]
Specify validation criteria for this collection.
- Parameters
-
validation | Validation criteria for this collection. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
- See also
- https://docs.mongodb.com/manual/core/document-validation/
The documentation for this class was generated from the following file: