MongoDB C++ Driver current
|
#include <bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp>
A variant owning 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 (bool v) | |
Constructs a BSON boolean value. | |
value (bsoncxx::v_noabi::array::view v) | |
Constructs a BSON array value. | |
value (bsoncxx::v_noabi::document::view v) | |
Constructs a BSON document value. | |
value (const char *v) | |
Constructs a BSON UTF-8 string value. | |
value (const type id) | |
Constructs one of the following BSON values (each specified by the parenthesized type): | |
value (const type id, stdx::string_view v) | |
Constructs one of the following BSON values (each specified by the parenthesized type): | |
value (const type id, uint64_t a, uint64_t b) | |
Constructs one of the following BSON values (each specified by the parenthesized type): | |
value (const uint8_t *data, size_t size, const binary_sub_type sub_type={}) | |
Constructs a BSON binary data value. | |
value (const view &) | |
Create an owning copy of a bson_value::view. | |
value (decimal128 v) | |
Constructs a BSON Decimal128 value. | |
value (double v) | |
Constructs a BSON double value. | |
value (int32_t v) | |
Constructs a BSON 32-bit signed integer value. | |
value (int64_t v) | |
Constructs a BSON 64-bit signed integer value. | |
value (oid v) | |
Constructs a BSON ObjectId value. | |
value (std::chrono::milliseconds v) | |
Constructs a BSON date value. | |
value (std::nullptr_t) | |
Constructs a BSON null value. | |
value (std::string v) | |
Constructs a BSON UTF-8 string value. | |
value (std::vector< unsigned char > v, const binary_sub_type sub_type={}) | |
Constructs a BSON binary data value. | |
value (stdx::string_view code, bsoncxx::v_noabi::document::view_or_value scope) | |
Constructs a BSON JavaScript code with scope value. | |
value (stdx::string_view collection, oid value) | |
Constructs a BSON DBPointer value. | |
value (stdx::string_view regex, stdx::string_view options) | |
Constructs a BSON regex value with options. | |
value (stdx::string_view v) | |
Constructs a BSON UTF-8 string value. | |
operator bson_value::view () const noexcept | |
Conversion operator that provides a bson_value::view given a bson_value::value. | |
bson_value::view | view () const noexcept |
Get a view over the bson_value owned by this object. | |
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_double | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_string | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_document | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_array | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_binary | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_undefined | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_oid | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_bool | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_date | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_null | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_regex | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_dbpointer | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_code | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_symbol | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_codewscope | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_int32 | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_timestamp | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_int64 | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_decimal128 | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_maxkey | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | b_minkey | v | ) |
Construct a bson_value::value from the provided BSON type.
bsoncxx::v_noabi::types::bson_value::value::value | ( | const char * | v | ) |
Constructs a BSON UTF-8 string value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | std::string | v | ) |
Constructs a BSON UTF-8 string value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | stdx::string_view | v | ) |
Constructs a BSON UTF-8 string value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | int32_t | v | ) |
Constructs a BSON 32-bit signed integer value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | int64_t | v | ) |
Constructs a BSON 64-bit signed integer value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | double | v | ) |
Constructs a BSON double value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | bool | v | ) |
Constructs a BSON boolean value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | oid | v | ) |
Constructs a BSON ObjectId value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | decimal128 | v | ) |
Constructs a BSON Decimal128 value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | std::chrono::milliseconds | v | ) |
Constructs a BSON date value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | std::nullptr_t | ) |
Constructs a BSON null value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | bsoncxx::v_noabi::document::view | v | ) |
Constructs a BSON document value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | bsoncxx::v_noabi::array::view | v | ) |
Constructs a BSON array value.
bsoncxx::v_noabi::types::bson_value::value::value | ( | std::vector< unsigned char > | v, |
const binary_sub_type | sub_type = {} |
||
) |
Constructs a BSON binary data value.
v | a stream of bytes |
sub_type | an optional binary sub type. Defaults to type::k_binary |
bsoncxx::v_noabi::types::bson_value::value::value | ( | const uint8_t * | data, |
size_t | size, | ||
const binary_sub_type | sub_type = {} |
||
) |
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 |
bsoncxx::v_noabi::types::bson_value::value::value | ( | stdx::string_view | collection, |
oid | value | ||
) |
Constructs a BSON DBPointer value.
collection | the collection name |
value | the object id |
bsoncxx::v_noabi::types::bson_value::value::value | ( | stdx::string_view | code, |
bsoncxx::v_noabi::document::view_or_value | scope | ||
) |
Constructs a BSON JavaScript code with scope value.
code | the JavaScript code |
scope | a bson document view holding the scope environment |
bsoncxx::v_noabi::types::bson_value::value::value | ( | stdx::string_view | regex, |
stdx::string_view | options | ||
) |
Constructs a BSON regex value with options.
regex | The regex pattern |
options | The regex options |
bsoncxx::v_noabi::types::bson_value::value::value | ( | const type | id, |
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. |
bsoncxx::v_noabi::types::bson_value::value::value | ( | const type | id | ) |
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 | ( | const type | id, |
uint64_t | a, | ||
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. |
|
explicit |
Create an owning copy of a bson_value::view.
|
noexcept |
Conversion operator that provides a bson_value::view given a bson_value::value.
|
noexcept |
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.