MongoDB C++ Driver
mongocxx-3.6.2
|
19 #include <type_traits>
21 #include <bsoncxx/array/value.hpp>
22 #include <bsoncxx/array/view.hpp>
23 #include <bsoncxx/document/value.hpp>
24 #include <bsoncxx/document/view.hpp>
25 #include <bsoncxx/stdx/string_view.hpp>
26 #include <bsoncxx/types.hpp>
28 #include <bsoncxx/config/prelude.hpp>
31 BSONCXX_INLINE_NAMESPACE_BEGIN
44 class BSONCXX_PRIVATE impl;
52 explicit core(
bool is_array);
55 core& operator=(
core&& rhs) noexcept;
509 template <
typename T>
511 static_assert(std::is_same<
typename std::remove_const<T>::type,
char>::value,
512 "append is disabled for non-char pointer types");
691 std::unique_ptr<impl> _impl;
695 BSONCXX_INLINE_NAMESPACE_END
698 #include <bsoncxx/config/postlude.hpp>
A BSON array value.
Definition: types.hpp:181
A BSON ObjectId value.
Definition: types.hpp:246
document::value extract_document()
Transfers ownership of the underlying document to the caller.
core & append(const types::b_null &value)
Appends a BSON null.
core & append(array::view view)
Appends the given array view.
core & append(const types::b_int32 &value)
Appends a BSON 32-bit signed integer.
core & append(const types::b_bool &value)
Appends a BSON boolean.
A BSON UTF-8 encoded string value.
Definition: types.hpp:113
core & append(const types::b_codewscope &value)
Appends a BSON JavaScript code with scope.
void clear()
Deletes the contents of the underlying BSON datum.
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
core & append(const types::b_minkey &value)
Appends a BSON min-key.
A BSON document value.
Definition: types.hpp:149
A BSON null value.
Definition: types.hpp:348
core & append(const types::b_int64 &value)
Appends a BSON 64-bit signed integer.
A BSON JavaScript code with scope value.
Definition: types.hpp:496
core & append(const types::b_timestamp &value)
Appends a BSON replication timestamp.
core(bool is_array)
Constructs an empty BSON datum.
A BSON 64-bit signed integer value.
Definition: types.hpp:580
core & key_owned(std::string key)
Appends a key passed as an STL string.
A BSON binary data value.
Definition: types.hpp:206
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
core & append(decimal128 value)
Appends a decimal128 object as a BSON Decimal128.
A read-only BSON document that owns its underlying buffer.
Definition: value.hpp:33
core & append(const types::b_array &value)
Appends a BSON array.
document::view view_document() const
Gets a view over the document.
core & append(const types::b_double &value)
Appends a BSON double.
core & append(const types::b_regex &value)
Appends a BSON regex.
core & append(std::int64_t value)
Appends a native int64_t as a BSON 64-bit signed integer.
core & append(const types::b_undefined &value)
Appends a BSON undefined.
core & key_view(stdx::string_view key)
Appends a key passed as a non-owning stdx::string_view.
A read-only BSON array that owns its underlying buffer.
Definition: value.hpp:34
A BSON Symbol value.
Definition: types.hpp:460
A BSON DBPointer value.
Definition: types.hpp:402
Represents a MongoDB ObjectId.
Definition: oid.hpp:38
core & append(const types::b_symbol &value)
Appends a BSON symbol.
core & open_array()
Opens a sub-array within this BSON datum.
A BSON regex value.
Definition: types.hpp:364
A BSON max-key value.
Definition: types.hpp:651
core & append(const types::b_decimal128 &value)
Appends a BSON Decimal128.
core & append(const types::b_utf8 &value)
Append a BSON UTF-8 string.
Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
Definition: decimal128.hpp:30
core & append(const types::bson_value::view &value)
Appends a BSON variant value.
A BSON replication timestamp value.
Definition: types.hpp:561
core & close_array()
Closes the current sub-array within this BSON datum.
A BSON date value.
Definition: types.hpp:289
A BSON signed 32-bit integer value.
Definition: types.hpp:532
A BSON min-key value.
Definition: types.hpp:635
A low-level interface for constructing BSON documents and arrays.
Definition: core.hpp:42
core & open_document()
Opens a sub-document within this BSON datum.
core & append(const types::b_binary &value)
Appends a BSON binary datum.
core & append(bool value)
Appends a native boolean as a BSON boolean.
core & append(std::int32_t value)
Appends a native int32_t as a BSON 32-bit signed integer.
core & append(const types::b_document &value)
Appends a BSON document.
A BSON JavaScript code value.
Definition: types.hpp:421
A BSON Decimal128 value.
Definition: types.hpp:605
core & append(const types::b_maxkey &value)
Appends a BSON max-key.
core & append(const types::b_dbpointer &value)
Appends a BSON DBPointer.
core & append(document::view view)
Appends the given document view.
core & append(std::string str)
Appends an STL string as a BSON UTF-8 string.
core & append(T *v)
Appends a char* or const char*.
Definition: core.hpp:510
array::value extract_array()
Transfers ownership of the underlying document to the caller.
A BSON undefined value.
Definition: types.hpp:230
core & concatenate(const document::view &view)
Appends the keys from a BSON document into this BSON datum.
core & close_document()
Closes the current sub-document within this BSON datum.
array::view view_array() const
Gets a view over the array.
core & append(stdx::string_view str)
Appends a string view as a BSON UTF-8 string.
core & append(const types::b_code &value)
Appends a BSON JavaScript code.
A BSON boolean value.
Definition: types.hpp:264
core & append(double value)
Appends a native double as a BSON double.
core & append(const types::b_oid &value)
Appends a BSON ObjectId.
A BSON double value.
Definition: types.hpp:88
core & append(const oid &value)
Appends an oid as a BSON ObjectId.
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
core & append(const types::b_date &value)
Appends a BSON date.
A view-only variant that can contain any BSON type.
Definition: view.hpp:44