Loading...
Searching...
No Matches
bsoncxx::v_noabi Namespace Reference

## Description

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.
v_noabi::array::value | from_v1 (v1::array::value &&v)
| Convert from the bsoncxx::v1 equivalent of v.
v_noabi::array::value | from_v1 (v1::array::value const &v)
| Convert from the bsoncxx::v1 equivalent of v.
v_noabi::array::view | from_v1 (v1::array::view const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::decimal128 | from_v1 (v1::decimal128 const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::document::value | from_v1 (v1::document::value &&v)
| Convert from the bsoncxx::v1 equivalent of v.
v_noabi::document::value | from_v1 (v1::document::value const &v)
| Convert from the bsoncxx::v1 equivalent of v.
v_noabi::document::view | from_v1 (v1::document::view const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
oid | from_v1 (v1::oid const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
binary_sub_type | from_v1 (v1::types::binary_subtype v)
| Convert from the bsoncxx::v1 equivalent of v.
type | from_v1 (v1::types::id v)
| Convert from the bsoncxx::v1 equivalent of v.
v_noabi::types::bson_value::value | from_v1 (v1::types::value v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::bson_value::view | from_v1 (v1::types::view const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
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.
v1::types::binary_subtype | to_v1 (binary_sub_type v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::id | to_v1 (type v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::element::view | to_v1 (v_noabi::array::element const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::array::value | to_v1 (v_noabi::array::value v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::array::view | to_v1 (v_noabi::array::view const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::decimal128 | to_v1 (v_noabi::decimal128 const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::element::view | to_v1 (v_noabi::document::element const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::document::value | to_v1 (v_noabi::document::value v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::document::view | to_v1 (v_noabi::document::view const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::oid | to_v1 (v_noabi::oid const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::value | to_v1 (v_noabi::types::bson_value::value v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::view | to_v1 (v_noabi::types::bson_value::view const &v)
| Convert to the bsoncxx::v1 equivalent of v.
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.
v_noabi::types::b_double | from_v1 (v1::types::b_double const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_string | from_v1 (v1::types::b_string const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_document | from_v1 (v1::types::b_document const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_array | from_v1 (v1::types::b_array const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_binary | from_v1 (v1::types::b_binary const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_undefined | from_v1 (v1::types::b_undefined const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_oid | from_v1 (v1::types::b_oid const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_bool | from_v1 (v1::types::b_bool const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_date | from_v1 (v1::types::b_date const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_null | from_v1 (v1::types::b_null const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_regex | from_v1 (v1::types::b_regex const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_dbpointer | from_v1 (v1::types::b_dbpointer const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_code | from_v1 (v1::types::b_code const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_symbol | from_v1 (v1::types::b_symbol const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_codewscope | from_v1 (v1::types::b_codewscope const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_int32 | from_v1 (v1::types::b_int32 const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_timestamp | from_v1 (v1::types::b_timestamp const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_int64 | from_v1 (v1::types::b_int64 const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_decimal128 | from_v1 (v1::types::b_decimal128 const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_maxkey | from_v1 (v1::types::b_maxkey const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v_noabi::types::b_minkey | from_v1 (v1::types::b_minkey const &v)
| Convert to the bsoncxx::v_noabi equivalent of v.
v1::types::b_double | to_v1 (v_noabi::types::b_double const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_string | to_v1 (v_noabi::types::b_string const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_document | to_v1 (v_noabi::types::b_document const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_array | to_v1 (v_noabi::types::b_array const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_binary | to_v1 (v_noabi::types::b_binary const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_undefined | to_v1 (v_noabi::types::b_undefined const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_oid | to_v1 (v_noabi::types::b_oid const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_bool | to_v1 (v_noabi::types::b_bool const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_date | to_v1 (v_noabi::types::b_date const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_null | to_v1 (v_noabi::types::b_null const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_regex | to_v1 (v_noabi::types::b_regex const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_dbpointer | to_v1 (v_noabi::types::b_dbpointer const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_code | to_v1 (v_noabi::types::b_code const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_symbol | to_v1 (v_noabi::types::b_symbol const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_codewscope | to_v1 (v_noabi::types::b_codewscope const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_int32 | to_v1 (v_noabi::types::b_int32 const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_timestamp | to_v1 (v_noabi::types::b_timestamp const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_int64 | to_v1 (v_noabi::types::b_int64 const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_decimal128 | to_v1 (v_noabi::types::b_decimal128 const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_maxkey | to_v1 (v_noabi::types::b_maxkey const &v)
| Convert to the bsoncxx::v1 equivalent of v.
v1::types::b_minkey | to_v1 (v_noabi::types::b_minkey const &v)
| Convert to the bsoncxx::v1 equivalent of v.
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.

## Enumeration Type Documentation

## binary_sub_type

enum class bsoncxx::v_noabi::binary_sub_type : std::uint8_t

strong

An enumeration of each BSON binary sub type.

Deprecated
  Use bsoncxx::v_noabi::types::binary_subtype instead (renamed).

Enumerator
k_binary | 0x00 | Generic binary subtype.
k_function | 0x01 | Function.

k_binary_deprecated

0x02

Binary (Old).

Deprecated

k_uuid_deprecated

0x03

UUID (Old).

Deprecated

k_uuid | 0x04 | UUID.
k_md5 | 0x05 | MD5.
k_encrypted | 0x06 | Encrypted BSON value.
k_column | 0x07 | Compressed BSON column.
k_sensitive | 0x08 | Sensitive.
k_vector | 0x09 | BSON Binary Vector.
k_user | 0x80 | User defined.

## error_code

enum class bsoncxx::v_noabi::error_code : std::int32_t

strong

Enum representing the various error types that can occur while operating on BSON values.

Note
  std::is_error_code_enum is specialized for this type.

Enumerator
k_cannot_append_key_in_sub_array | A new key was appended while building a subarray.
k_cannot_close_array_in_sub_document | A subarray was closed while building a subdocument.
k_cannot_close_document_in_sub_array | A subdocument was closed while building a subarray.
k_cannot_perform_array_operation_on_document | An array operation was performed while building a document.
k_cannot_perform_document_operation_on_array | A document operation was performed while building an array.
k_need_element_type_k_double | The underlying value does not have the requested type.
k_need_element_type_k_string | The underlying value does not have the requested type.
k_need_element_type_k_document | The underlying value does not have the requested type.
k_need_element_type_k_array | The underlying value does not have the requested type.
k_need_element_type_k_binary | The underlying value does not have the requested type.
k_need_element_type_k_undefined | The underlying value does not have the requested type.
k_need_element_type_k_oid | The underlying value does not have the requested type.
k_need_element_type_k_bool | The underlying value does not have the requested type.
k_need_element_type_k_date | The underlying value does not have the requested type.
k_need_element_type_k_null | The underlying value does not have the requested type.
k_need_element_type_k_regex | The underlying value does not have the requested type.
k_need_element_type_k_dbpointer | The underlying value does not have the requested type.
k_need_element_type_k_code | The underlying value does not have the requested type.
k_need_element_type_k_symbol | The underlying value does not have the requested type.
k_need_element_type_k_codewscope | The underlying value does not have the requested type.
k_need_element_type_k_int32 | The underlying value does not have the requested type.
k_need_element_type_k_timestamp | The underlying value does not have the requested type.
k_need_element_type_k_int64 | The underlying value does not have the requested type.
k_need_element_type_k_decimal128 | The underlying value does not have the requested type.
k_need_element_type_k_maxkey | The underlying value does not have the requested type.
k_need_element_type_k_minkey | The underlying value does not have the requested type.
k_need_key | No key was provided when one was needed.
k_no_array_to_close | An array was closed while no array was open.
k_no_document_to_close | A document was closed while no document was open.
k_unmatched_key_in_builder | Attempted to view or extract a document when a key was still awaiting a matching value.
k_unset_element | An empty element was accessed.
k_json_parse_failure | A JSON document failed to parse.
k_invalid_oid | An Object ID string failed to parse.
k_failed_converting_bson_to_json | This type is unused and deprecated.
k_invalid_decimal128 | A Decimal128 string failed to parse.
k_internal_error | BSON data could not be processed, but no specific reason was available.
k_cannot_begin_appending_array | Failed to begin appending an array to a BSON document or array.
k_cannot_begin_appending_document | Failed to begin appending a BSON document to a BSON document or array.
k_cannot_end_appending_array | Failed to complete appending an array to a BSON document or array.
k_cannot_end_appending_document | Failed to complete appending a BSON document to a BSON document or array.
k_invalid_binary_subtype | Invalid binary subtype.
k_invalid_bson_type_id | Invalid type.
k_cannot_append_double | Failed to append a value of the given type.
k_cannot_append_string | Failed to append a value of the given type.
k_cannot_append_document | Failed to append a value of the given type.
k_cannot_append_array | Failed to append a value of the given type.
k_cannot_append_binary | Failed to append a value of the given type.
k_cannot_append_undefined | Failed to append a value of the given type.
k_cannot_append_oid | Failed to append a value of the given type.
k_cannot_append_bool | Failed to append a value of the given type.
k_cannot_append_date | Failed to append a value of the given type.
k_cannot_append_null | Failed to append a value of the given type.
k_cannot_append_regex | Failed to append a value of the given type.
k_cannot_append_dbpointer | Failed to append a value of the given type.
k_cannot_append_code | Failed to append a value of the given type.
k_cannot_append_symbol | Failed to append a value of the given type.
k_cannot_append_codewscope | Failed to append a value of the given type.
k_cannot_append_int32 | Failed to append a value of the given type.
k_cannot_append_timestamp | Failed to append a value of the given type.
k_cannot_append_int64 | Failed to append a value of the given type.
k_cannot_append_decimal128 | Failed to append a value of the given type.
k_cannot_append_maxkey | Failed to append a value of the given type.
k_cannot_append_minkey | Failed to append a value of the given type.
k_invalid_vector | A BSON Binary Vector failed to parse in the requested format.
k_vector_too_large | A BSON Binary Vector would be too large to represent.
k_vector_out_of_range | Attempted out-of-range access to a BSON Binary Vector element.

## ExtendedJsonMode

enum class bsoncxx::v_noabi::ExtendedJsonMode : std::uint8_t

strong

An enumeration of the types of Extended JSON that the to_json function accepts.

Enumerator
k_legacy | to produce Legacy Extended JSON
k_canonical | to produce Canonical Extended JSON
k_relaxed | to produce Relaxed Extended JSON

## type

enum class bsoncxx::v_noabi::type : std::uint8_t

strong

An enumeration of each BSON type.

Deprecated
  Use bsoncxx::v_noabi::types::id instead (renamed).

Enumerator
k_double | 0x01 | 64-bit binary floating point.
k_string | 0x02 | UTF-8 string.
k_document | 0x03 | Embedded document.
k_array | 0x04 | Array.
k_binary | 0x05 | Binary data.

k_undefined

0x06

Undefined value.

Deprecated

k_oid | 0x07 | ObjectId.
k_bool | 0x08 | Boolean.
k_date | 0x09 | UTC datetime.
k_null | 0x0A | Null value.
k_regex | 0x0B | Regular expression.

k_dbpointer

0x0C

DBPointer.

Deprecated

k_code | 0x0D | JavaScript code.

k_symbol

0x0E

Symbol.

Deprecated

k_codewscope | 0x0F | JavaScript code with scope.
k_int32 | 0x10 | 32-bit integer.
k_timestamp | 0x11 | Timestamp.
k_int64 | 0x12 | 64-bit integer.
k_decimal128 | 0x13 | 128-bit decimal floating point.
k_maxkey | 0x7F | Max key.
k_minkey | 0xFF | Min key.

## Function Documentation

## error_category()

std::error_category const & bsoncxx::v_noabi::error_category | ( |  | ) |

Get the error_category for exceptions originating from the bsoncxx library.

Returns
  The bsoncxx error_category

## from_json()

document::value bsoncxx::v_noabi::from_json | ( | stdx::string_view | json | ) |

Constructs a new document::value from the provided JSON text.

Parameters

  json | A string_view into a JSON document.

Returns
  A document::value if conversion worked.

Exceptions

  bsoncxx::v_noabi::exception | with error details if the conversion failed.

## from_v1() [1/33]

v_noabi::array::value bsoncxx::v_noabi::from_v1 | ( | v1::array::value && | v | ) |

Convert from the bsoncxx::v1 equivalent of v.

Exceptions

  bsoncxx::v_noabi::exception | with bsoncxx::v_noabi::error_code::k_invalid_deleter_type if the type of the deleter for value is not bsoncxx::v_noabi::array::value::deleter_type.

## from_v1() [2/33]

v_noabi::array::value bsoncxx::v_noabi::from_v1 | ( | v1::array::value const & | v | ) |

inline

Convert from the bsoncxx::v1 equivalent of v.

## from_v1() [3/33]

v_noabi::array::view bsoncxx::v_noabi::from_v1 | ( | v1::array::view const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [4/33]

v_noabi::decimal128 bsoncxx::v_noabi::from_v1 | ( | v1::decimal128 const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [5/33]

v_noabi::document::value bsoncxx::v_noabi::from_v1 | ( | v1::document::value && | v | ) |

Convert from the bsoncxx::v1 equivalent of v.

## from_v1() [6/33]

v_noabi::document::value bsoncxx::v_noabi::from_v1 | ( | v1::document::value const & | v | ) |

inline

Convert from the bsoncxx::v1 equivalent of v.

## from_v1() [7/33]

v_noabi::document::view bsoncxx::v_noabi::from_v1 | ( | v1::document::view const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [8/33]

oid bsoncxx::v_noabi::from_v1 | ( | v1::oid const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [9/33]

v_noabi::types::b_array bsoncxx::v_noabi::from_v1 | ( | v1::types::b_array const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [10/33]

v_noabi::types::b_binary bsoncxx::v_noabi::from_v1 | ( | v1::types::b_binary const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [11/33]

v_noabi::types::b_bool bsoncxx::v_noabi::from_v1 | ( | v1::types::b_bool const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [12/33]

v_noabi::types::b_code bsoncxx::v_noabi::from_v1 | ( | v1::types::b_code const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [13/33]

v_noabi::types::b_codewscope bsoncxx::v_noabi::from_v1 | ( | v1::types::b_codewscope const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [14/33]

v_noabi::types::b_date bsoncxx::v_noabi::from_v1 | ( | v1::types::b_date const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [15/33]

v_noabi::types::b_dbpointer bsoncxx::v_noabi::from_v1 | ( | v1::types::b_dbpointer const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [16/33]

v_noabi::types::b_decimal128 bsoncxx::v_noabi::from_v1 | ( | v1::types::b_decimal128 const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [17/33]

v_noabi::types::b_document bsoncxx::v_noabi::from_v1 | ( | v1::types::b_document const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [18/33]

v_noabi::types::b_double bsoncxx::v_noabi::from_v1 | ( | v1::types::b_double const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [19/33]

v_noabi::types::b_int32 bsoncxx::v_noabi::from_v1 | ( | v1::types::b_int32 const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [20/33]

v_noabi::types::b_int64 bsoncxx::v_noabi::from_v1 | ( | v1::types::b_int64 const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [21/33]

v_noabi::types::b_maxkey bsoncxx::v_noabi::from_v1 | ( | v1::types::b_maxkey const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [22/33]

v_noabi::types::b_minkey bsoncxx::v_noabi::from_v1 | ( | v1::types::b_minkey const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [23/33]

v_noabi::types::b_null bsoncxx::v_noabi::from_v1 | ( | v1::types::b_null const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [24/33]

v_noabi::types::b_oid bsoncxx::v_noabi::from_v1 | ( | v1::types::b_oid const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [25/33]

v_noabi::types::b_regex bsoncxx::v_noabi::from_v1 | ( | v1::types::b_regex const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [26/33]

v_noabi::types::b_string bsoncxx::v_noabi::from_v1 | ( | v1::types::b_string const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [27/33]

v_noabi::types::b_symbol bsoncxx::v_noabi::from_v1 | ( | v1::types::b_symbol const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [28/33]

v_noabi::types::b_timestamp bsoncxx::v_noabi::from_v1 | ( | v1::types::b_timestamp const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [29/33]

v_noabi::types::b_undefined bsoncxx::v_noabi::from_v1 | ( | v1::types::b_undefined const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [30/33]

binary_sub_type bsoncxx::v_noabi::from_v1 | ( | v1::types::binary_subtype | v | ) |

inline

Convert from the bsoncxx::v1 equivalent of v.

## from_v1() [31/33]

type bsoncxx::v_noabi::from_v1 | ( | v1::types::id | v | ) |

inline

Convert from the bsoncxx::v1 equivalent of v.

## from_v1() [32/33]

v_noabi::types::bson_value::value bsoncxx::v_noabi::from_v1 | ( | v1::types::value | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## from_v1() [33/33]

v_noabi::types::bson_value::view bsoncxx::v_noabi::from_v1 | ( | v1::types::view const & | v | ) |

inline

Convert to the bsoncxx::v_noabi equivalent of v.

## make_error_code()

std::error_code bsoncxx::v_noabi::make_error_code | ( | error_code | error | ) |

inline

Translate a bsoncxx::v_noabi::error_code into a std::error_code.

Parameters

  error | An error from bsoncxx

Returns
  An error_code

## operator!=() [1/10]

template<typename View, typename Value>

bool operator!= | ( | Value const & | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator!=() [2/10]

template<typename View, typename Value>

bool operator!= | ( | View | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator!=() [3/10]

template<typename View, typename Value>

bool operator!= | ( | view_or_value< View, Value > const & | lhs,
|  | Value const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator!=() [4/10]

template<typename View, typename Value>

bool operator!= | ( | view_or_value< View, Value > const & | lhs,
|  | View | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator!=() [5/10]

template<typename View, typename Value>

bool operator!= | ( | view_or_value< View, Value > const & | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Compare view_or_value objects for (in)equality.

## operator""_bson()

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().

Parameters

  json | A string into a JSON document.
  len | The length of the JSON string. This is calculated automatically upon use of the UDL.

Returns
  A document::value if conversion worked.

Exceptions

  bsoncxx::v_noabi::exception | with error details if the conversion failed.

## operator==() [1/10]

template<typename View, typename Value>

bool operator== | ( | Value const & | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator==() [2/10]

template<typename View, typename Value>

bool operator== | ( | View | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator==() [3/10]

template<typename View, typename Value>

bool operator== | ( | view_or_value< View, Value > const & | lhs,
|  | Value const & | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator==() [4/10]

template<typename View, typename Value>

bool operator== | ( | view_or_value< View, Value > const & | lhs,
|  | View | rhs )

related

Mixed (in)equality operators for view_or_value against View and Value types.

## operator==() [5/10]

template<typename View, typename Value>

bool operator== | ( | view_or_value< View, Value > const & | lhs,
|  | view_or_value< View, Value > const & | rhs )

related

Compare view_or_value objects for (in)equality.

## to_json() [1/2]

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.

Parameters

  view | A valid BSON document or array.
  mode | An optional JSON representation mode.

Exceptions

  bsoncxx::v_noabi::exception | with error details if the conversion failed.

Returns
  An extended JSON string.

## to_json() [2/2]

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.

Parameters

  view | A valid BSON document or array.
  mode | An optional JSON representation mode.

Exceptions

  bsoncxx::v_noabi::exception | with error details if the conversion failed.

Returns
  An extended JSON string.

## to_string() [1/2]

std::string bsoncxx::v_noabi::to_string | ( | binary_sub_type | rhs | ) |

inline

Returns a stringification of the given binary sub type.

Parameters

  rhs | The type to stringify.

Returns
  a std::string representation of the type.

## to_string() [2/2]

std::string bsoncxx::v_noabi::to_string | ( | type | rhs | ) |

inline

Returns a stringification of the given type.

Parameters

  rhs | The type to stringify.

Returns
  a std::string representation of the type.

## to_v1() [1/33]

v1::types::binary_subtype bsoncxx::v_noabi::to_v1 | ( | binary_sub_type | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [2/33]

v1::types::id bsoncxx::v_noabi::to_v1 | ( | type | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [3/33]

v1::element::view bsoncxx::v_noabi::to_v1 | ( | v_noabi::array::element const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [4/33]

v1::array::value bsoncxx::v_noabi::to_v1 | ( | v_noabi::array::value | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [5/33]

v1::array::view bsoncxx::v_noabi::to_v1 | ( | v_noabi::array::view const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [6/33]

v1::decimal128 bsoncxx::v_noabi::to_v1 | ( | v_noabi::decimal128 const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [7/33]

v1::element::view bsoncxx::v_noabi::to_v1 | ( | v_noabi::document::element const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [8/33]

v1::document::value bsoncxx::v_noabi::to_v1 | ( | v_noabi::document::value | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [9/33]

v1::document::view bsoncxx::v_noabi::to_v1 | ( | v_noabi::document::view const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [10/33]

v1::oid bsoncxx::v_noabi::to_v1 | ( | v_noabi::oid const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [11/33]

v1::types::b_array bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_array const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [12/33]

v1::types::b_binary bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_binary const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [13/33]

v1::types::b_bool bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_bool const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [14/33]

v1::types::b_code bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_code const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [15/33]

v1::types::b_codewscope bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_codewscope const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [16/33]

v1::types::b_date bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_date const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [17/33]

v1::types::b_dbpointer bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_dbpointer const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [18/33]

v1::types::b_decimal128 bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_decimal128 const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [19/33]

v1::types::b_document bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_document const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [20/33]

v1::types::b_double bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_double const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [21/33]

v1::types::b_int32 bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_int32 const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [22/33]

v1::types::b_int64 bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_int64 const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [23/33]

v1::types::b_maxkey bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_maxkey const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [24/33]

v1::types::b_minkey bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_minkey const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [25/33]

v1::types::b_null bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_null const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [26/33]

v1::types::b_oid bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_oid const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [27/33]

v1::types::b_regex bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_regex const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [28/33]

v1::types::b_string bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_string const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [29/33]

v1::types::b_symbol bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_symbol const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [30/33]

v1::types::b_timestamp bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_timestamp const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [31/33]

v1::types::b_undefined bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::b_undefined const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [32/33]

v1::types::value bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::bson_value::value | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## to_v1() [33/33]

v1::types::view bsoncxx::v_noabi::to_v1 | ( | v_noabi::types::bson_value::view const & | v | ) |

inline

Convert to the bsoncxx::v1 equivalent of v.

## validate() [1/2]

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.

Parameters

  data | A buffer containing a BSON document to validate.
  length | The size of the buffer.

Returns
  An engaged optional containing a view if the document is valid, or an unengaged optional if the document is invalid.

## validate() [2/2]

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.

Parameters

  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).

Returns
  An engaged optional containing a view if the document is valid, or an unengaged optional if the document is invalid.