#include <bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp>
An owning variant type that represents any BSON type.
Owns its underlying buffer. When a bson_value::value goes out of scope, its underlying buffer is freed.
For accessors into this type and to extract the various BSON types out, please use bson_value::view.
Public Member Functions | |
| value ()=default | |
| Initialize with bsoncxx::v1::types::b_null. | |
| value (bool v) | |
| Constructs a BSON boolean value. | |
| value (char const *v) | |
| Constructs a BSON UTF-8 string value. | |
| value (double v) | |
| Constructs a BSON double value. | |
| value (std::chrono::milliseconds v) | |
| Constructs a BSON date value. | |
| value (std::int32_t v) | |
| Constructs a BSON 32-bit signed integer value. | |
| value (std::int64_t v) | |
| Constructs a BSON 64-bit signed integer value. | |
| value (std::nullptr_t) | |
| Constructs a BSON null value. | |
| value (std::string v) | |
| Constructs a BSON UTF-8 string value. | |
| value (std::uint8_t const *data, std::size_t size, v_noabi::binary_sub_type const sub_type={}) | |
| Constructs a BSON binary data value. | |
| value (std::vector< unsigned char > v, v_noabi::binary_sub_type const sub_type={}) | |
| Constructs a BSON binary data value. | |
| template<typename T, detail::enable_if_t< has_from_v1< T >::value > * = nullptr> | |
| value (T v) | |
| Construct with the bsoncxx::v1 equivalent. | |
| value (v1::stdx::string_view code, v_noabi::document::view_or_value scope) | |
| Constructs a BSON JavaScript code with scope value. | |
| value (v1::stdx::string_view collection, v_noabi::oid value) | |
| Constructs a BSON DBPointer value. | |
| value (v1::stdx::string_view regex, v1::stdx::string_view options) | |
| Constructs a BSON regex value with options. | |
| value (v1::stdx::string_view v) | |
| Constructs a BSON UTF-8 string value. | |
| value (v1::types::value v) | |
| Construct with the bsoncxx::v1 equivalent. | |
| value (v_noabi::array::view v) | |
| Constructs a BSON array value. | |
| value (v_noabi::decimal128 v) | |
| Constructs a BSON Decimal128 value. | |
| value (v_noabi::document::view v) | |
| Constructs a BSON document value. | |
| value (v_noabi::oid v) | |
| Constructs a BSON ObjectId value. | |
| value (v_noabi::type const idid) | |
| Constructs one of the following BSON values (each specified by the parenthesized type): | |
| value (v_noabi::type const idid, std::uint64_t a, std::uint64_t b) | |
| Constructs one of the following BSON values (each specified by the parenthesized type): | |
| value (v_noabi::type const idid, v1::stdx::string_view v) | |
| Constructs one of the following BSON values (each specified by the parenthesized type): | |
| value (v_noabi::types::bson_value::view const &v) | |
| Create an owning copy of a bson_value::view. | |
| operator v1::types::value () && | |
| Convert to the bsoncxx::v1 equivalent. | |
| operator v1::types::value () const & | |
| Convert to the bsoncxx::v1 equivalent. | |
| operator v_noabi::types::bson_value::view () const noexcept | |
| Conversion operator that provides a bson_value::view given a bson_value::value. | |
| v_noabi::type | type () const |
| Returns the type of the underlying BSON value stored in this object. | |
| v_noabi::type | type_id () const |
| Equivalent to type() const. | |
| v_noabi::types::bson_value::view | view () const noexcept |
| Get a view over the bson_value owned by this object. | |
| value (v_noabi::types::b_minkey v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_double v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_string v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_document v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_array v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_binary v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_undefined v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_oid v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_bool v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_date v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_null v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_regex v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_dbpointer v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_code v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_symbol v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_codewscope v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_int32 v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_timestamp v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_int64 v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_decimal128 v) | |
| Construct a bson_value::value from the provided BSON type. | |
| value (v_noabi::types::b_maxkey v) | |
| Construct a bson_value::value from the provided BSON type. | |
| v_noabi::types::b_minkey | get_minkey () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_double | get_double () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_string | get_string () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_document | get_document () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_array | get_array () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_binary | get_binary () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_undefined | get_undefined () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_oid | get_oid () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_bool | get_bool () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_date | get_date () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_null | get_null () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_regex | get_regex () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_dbpointer | get_dbpointer () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_code | get_code () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_symbol | get_symbol () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_codewscope | get_codewscope () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_int32 | get_int32 () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_timestamp | get_timestamp () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_int64 | get_int64 () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_decimal128 | get_decimal128 () const |
| Return the underlying BSON type value. | |
| v_noabi::types::b_maxkey | get_maxkey () const |
| Return the underlying BSON type value. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| bool | operator== (value const &lhs, value const &rhs) |
| Compares values for (in)-equality. | |
| bool | operator!= (value const &lhs, value const &rhs) |
| Compares values for (in)-equality. | |
| bool | operator== (value const &lhs, view const &rhs) |
| Compares a value with a view for (in)equality. | |
| bool | operator== (view const &lhs, value const &rhs) |
| Compares a value with a view for (in)equality. | |
| bool | operator!= (value const &lhs, view const &rhs) |
| Compares a value with a view for (in)equality. | |
| bool | operator!= (view const &lhs, value const &rhs) |
| Compares a value with a view for (in)equality. | |
Initialize with bsoncxx::v1::types::b_null.
Construct with the bsoncxx::v1 equivalent.
|
inline |
Construct with the bsoncxx::v1 equivalent.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
Construct a bson_value::value from the provided BSON type.
|
inline |
Constructs a BSON UTF-8 string value.
|
inline |
Constructs a BSON UTF-8 string value.
Constructs a BSON UTF-8 string value.
|
inline |
Constructs a BSON 32-bit signed integer value.
|
inline |
Constructs a BSON 64-bit signed integer value.
|
inline |
Constructs a BSON double value.
|
inline |
Constructs a BSON boolean value.
Constructs a BSON ObjectId value.
Constructs a BSON Decimal128 value.
|
inline |
Constructs a BSON date value.
|
inline |
Constructs a BSON null value.
Constructs a BSON document value.
Constructs a BSON array value.
|
inline |
Constructs a BSON binary data value.
| v | a stream of bytes |
| sub_type | an optional binary sub type. Defaults to type::k_binary |
|
inline |
Constructs a BSON binary data value.
| data | pointer to a stream of bytes |
| size | the size of the stream of bytes |
| sub_type | an optional binary sub type. Defaults to type::k_binary |
|
inline |
Constructs a BSON DBPointer value.
| collection | the collection name |
| value | the object id |
|
inline |
Constructs a BSON JavaScript code with scope value.
| code | the JavaScript code |
| scope | a bson document view holding the scope environment |
|
inline |
Constructs a BSON regex value with options.
| regex | The regex pattern |
| options | The regex options |
| bsoncxx::v_noabi::types::bson_value::value::value | ( | v_noabi::type const | id, |
| v1::stdx::string_view | v ) |
Constructs one of the following BSON values (each specified by the parenthesized type):
| id | the type of BSON value to construct. |
| v | the symbol, JavaScript code, or regex pattern for the BSON symbol, code, or regex value respectively. |
| bsoncxx::v_noabi::exception | if the type's value is not k_code, k_regex, or k_symbol. |
Constructs one of the following BSON values (each specified by the parenthesized type):
| id | the type of BSON value to construct. |
| bsoncxx::v_noabi::exception | if the type's value is not k_maxkey, k_minkey, or k_undefined. |
| bsoncxx::v_noabi::types::bson_value::value::value | ( | v_noabi::type const | id, |
| std::uint64_t | a, | ||
| std::uint64_t | b ) |
Constructs one of the following BSON values (each specified by the parenthesized type):
| id | the type of the BSON value to construct. |
| a | If a BSON decimal128 value is to be constructed, this is the high value. If a BSON timestamp value is to be constructed, this is the increment. |
| b | If a BSON decimal128 value is to be constructed, this is the low value. If a BSON timestamp value is to be constructed, this is the timestamp. |
| bsoncxx::v_noabi::exception | if the specified type is missing its required arguments. |
|
inlineexplicit |
Create an owning copy of a bson_value::view.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
|
inline |
Return the underlying BSON type value.
|
inlineexplicit |
Convert to the bsoncxx::v1 equivalent.
|
inlineexplicit |
Convert to the bsoncxx::v1 equivalent.
|
inlinenoexcept |
Conversion operator that provides a bson_value::view given a bson_value::value.
|
inline |
Returns the type of the underlying BSON value stored in this object.
|
inline |
Equivalent to type() const.
To support incremental migration to bsoncxx::v1::types::value.
|
inlinenoexcept |
Get a view over the bson_value owned by this object.
Compares a value with a view for (in)equality.
Compares a value with a view for (in)equality.
Compares a value with a view for (in)equality.
Compares a value with a view for (in)equality.