#include <mongocxx/v1/server_api.hpp>
Options related to MongoDB Stable API configuration.
Supported fields include:
- See also
-
◆ errc
Errors codes which may be returned by mongocxx::v1::server_api.
- Attention
- This feature is experimental! It is not ready for use!
| Enumerator |
|---|
| zero | Zero.
|
| invalid_version | The server API version is invalid.
|
◆ version
The server API version.
- Note
- Not to be confused with the MongoDB C++ Driver's API or ABI version.
| Enumerator |
|---|
| k_version_1 | Stable API Version 1.
|
◆ ~server_api()
| mongocxx::v1::server_api::~server_api |
( |
| ) |
|
Destroy this object.
- Warning
- Invalidates all associated views.
◆ server_api() [1/3]
| mongocxx::v1::server_api::server_api |
( |
server_api && | other | ) |
|
|
noexcept |
Move constructor.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ server_api() [2/3]
| mongocxx::v1::server_api::server_api |
( |
server_api const & | other | ) |
|
◆ server_api() [3/3]
| mongocxx::v1::server_api::server_api |
( |
version | v | ) |
|
|
explicit |
Initialize with the given server API version.
- Postconditions:
- this->get_version() == v.
- All other supported fields are "unset" or zero-initialized.
◆ deprecation_errors() [1/2]
Return the current "deprecationErrors" field.
◆ deprecation_errors() [2/2]
| server_api & mongocxx::v1::server_api::deprecation_errors |
( |
bool | v | ) |
|
Set the "deprecationErrors" field.
◆ error_category()
| std::error_category const & mongocxx::v1::server_api::error_category |
( |
| ) |
|
|
static |
◆ get_version()
| version mongocxx::v1::server_api::get_version |
( |
| ) |
const |
Return the current "version" field.
◆ operator=() [1/2]
Move assignment.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ operator=() [2/2]
◆ strict() [1/2]
Return the current "strict" field.
◆ strict() [2/2]
| server_api & mongocxx::v1::server_api::strict |
( |
bool | strict | ) |
|
◆ version_from_string()
Return the given server API version as an enumerator.
- Exceptions
-
◆ version_to_string()
| std::string mongocxx::v1::server_api::version_to_string |
( |
version | v | ) |
|
|
static |
Return the given server API version as a string.
- Exceptions
-
◆ make_error_code
| std::error_code make_error_code |
( |
errc | v | ) |
|
|
friend |
Support implicit conversion to std::error_code.
- Attention
- This feature is experimental! It is not ready for use!
The documentation for this class was generated from the following file: