MongoDB C++ Driver 4.1.0
|
Declares entities whose ABI stability is NOT guaranteed.
Namespaces | |
namespace | array |
Declares entities representing a BSON array. | |
namespace | builder |
Declares entities used to build BSON documents. | |
namespace | document |
Declares entities representing a BSON document. | |
namespace | stdx |
Declares C++17 standard library polyfills. | |
namespace | string |
Declares entities related to handling string types. | |
namespace | types |
Declares entities representing BSON value types. | |
namespace | vector |
Declarations related to the BSON Binary Vector subtype. | |
Classes | |
class | decimal128 |
Represents a MongoDB BSON Decimal128. More... | |
class | exception |
Base class for all exceptions thrown by the bsoncxx library unless otherwise specified. More... | |
class | oid |
Represents a MongoDB BSON ObjectId. More... | |
class | validator |
Used to toggle checks which may be performed during BSON validation. More... | |
class | view_or_value |
A view-or-value variant type. More... | |
Enumerations | |
enum class | binary_sub_type : std::uint8_t |
An enumeration of each BSON binary sub type. More... | |
enum class | error_code : std::int32_t |
Enum representing the various error types that can occur while operating on BSON values. More... | |
enum class | ExtendedJsonMode : std::uint8_t |
An enumeration of the types of Extended JSON that the to_json function accepts. More... | |
enum class | type : std::uint8_t |
An enumeration of each BSON type. More... | |
Functions | |
std::error_category const & | error_category () |
Get the error_category for exceptions originating from the bsoncxx library. | |
document::value | from_json (stdx::string_view json) |
Constructs a new document::value from the provided JSON text. | |
std::error_code | make_error_code (error_code error) |
Translate a bsoncxx::v_noabi::error_code into a std::error_code. | |
document::value | operator""_bson (char const *json, size_t len) |
Constructs a new document::value from the provided JSON text. This is the UDL version of from_json(). | |
std::string | to_string (binary_sub_type rhs) |
Returns a stringification of the given binary sub type. | |
std::string | to_string (type rhs) |
Returns a stringification of the given type. | |
stdx::optional< document::view > | validate (std::uint8_t const *data, std::size_t length) |
Validates a BSON document. This is a simplified overload that will only do the bare minimum validation of document structure, and does not provide any further information if the document is found to be invalid. | |
stdx::optional< document::view > | validate (std::uint8_t const *data, std::size_t length, validator const &validator, std::size_t *invalid_offset=nullptr) |
Validates a BSON document. This overload provides additional control over the precise validation that is performed, and will give the caller access to the offset at which the document was found to be invalid. | |
std::string | to_json (document::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy) |
Converts a BSON document to a JSON string, in extended format. | |
std::string | to_json (array::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy) |
Converts a BSON document to a JSON string, in extended format. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, view_or_value< View, Value > const &rhs) |
Compare view_or_value objects for (in)equality. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, view_or_value< View, Value > const &rhs) |
Compare view_or_value objects for (in)equality. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, view_or_value< View, Value > const &rhs) |
Compare view_or_value objects for (in)equality. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, view_or_value< View, Value > const &rhs) |
Compare view_or_value objects for (in)equality. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, View rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (View lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, View rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (View lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, Value const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (Value const &lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, Value const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (Value const &lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, View rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (View lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, View rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (View lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (view_or_value< View, Value > const &lhs, Value const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator== (Value const &lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (view_or_value< View, Value > const &lhs, Value const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
template<typename View, typename Value> | |
bool | operator!= (Value const &lhs, view_or_value< View, Value > const &rhs) |
Mixed (in)equality operators for view_or_value against View and Value types. | |
|
strong |
An enumeration of each BSON binary sub type.
|
strong |
Enum representing the various error types that can occur while operating on BSON values.
std::is_error_code_enum
is specialized for this type.
|
strong |
|
strong |
An enumeration of each BSON type.
std::error_category const & bsoncxx::v_noabi::error_category | ( | ) |
Get the error_category for exceptions originating from the bsoncxx library.
document::value bsoncxx::v_noabi::from_json | ( | stdx::string_view | json | ) |
Constructs a new document::value from the provided JSON text.
json | A string_view into a JSON document. |
bsoncxx::v_noabi::exception | with error details if the conversion failed. |
|
inline |
Translate a bsoncxx::v_noabi::error_code into a std::error_code.
error | An error from bsoncxx |
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Compare view_or_value objects for (in)equality.
document::value bsoncxx::v_noabi::operator""_bson | ( | char const * | json, |
size_t | len ) |
Constructs a new document::value from the provided JSON text. This is the UDL version of from_json().
json | A string into a JSON document. |
len | The length of the JSON string. This is calculated automatically upon use of the UDL. |
bsoncxx::v_noabi::exception | with error details if the conversion failed. |
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Mixed (in)equality operators for view_or_value against View and Value types.
|
Compare view_or_value objects for (in)equality.
std::string bsoncxx::v_noabi::to_json | ( | array::view | view, |
ExtendedJsonMode | mode = ExtendedJsonMode::k_legacy ) |
Converts a BSON document to a JSON string, in extended format.
view | A valid BSON document or array. |
mode | An optional JSON representation mode. |
bsoncxx::v_noabi::exception | with error details if the conversion failed. |
std::string bsoncxx::v_noabi::to_json | ( | document::view | view, |
ExtendedJsonMode | mode = ExtendedJsonMode::k_legacy ) |
Converts a BSON document to a JSON string, in extended format.
view | A valid BSON document or array. |
mode | An optional JSON representation mode. |
bsoncxx::v_noabi::exception | with error details if the conversion failed. |
std::string bsoncxx::v_noabi::to_string | ( | binary_sub_type | rhs | ) |
Returns a stringification of the given binary sub type.
rhs | The type to stringify. |
std::string bsoncxx::v_noabi::to_string | ( | type | rhs | ) |
Returns a stringification of the given type.
rhs | The type to stringify. |
stdx::optional< document::view > bsoncxx::v_noabi::validate | ( | std::uint8_t const * | data, |
std::size_t | length ) |
Validates a BSON document. This is a simplified overload that will only do the bare minimum validation of document structure, and does not provide any further information if the document is found to be invalid.
data | A buffer containing a BSON document to validate. |
length | The size of the buffer. |
stdx::optional< document::view > bsoncxx::v_noabi::validate | ( | std::uint8_t const * | data, |
std::size_t | length, | ||
validator const & | validator, | ||
std::size_t * | invalid_offset = nullptr ) |
Validates a BSON document. This overload provides additional control over the precise validation that is performed, and will give the caller access to the offset at which the document was found to be invalid.
data | A buffer containing a BSON document to validate. |
length | The size of the buffer. |
validator | A validator used to configure what checks are done. If validation fails, it will contain the offset at which the document was found to be invalid. |
invalid_offset | If validation fails, the offset at which the document was found to be invalid will be stored here (if non-null). |