43 ~insert_one() =
default;
45 insert_one(insert_one&& other)
noexcept =
default;
46 insert_one& operator=(insert_one&& other)
noexcept =
default;
48 insert_one(insert_one
const& other)
49 : _result{other._result}, _inserted_id_owned{other._inserted_id_owned}, _inserted_id{_inserted_id_owned} {}
51 insert_one& operator=(insert_one
const& other) {
53 _result = other._result;
54 _inserted_id_owned = other._inserted_id_owned;
55 _inserted_id = _inserted_id_owned;
65 : _result{std::move(
result)}, _inserted_id_owned{
inserted_id}, _inserted_id{_inserted_id_owned} {}
96 return lhs._result == rhs._result && lhs._inserted_id == rhs._inserted_id;
99 friend bool operator!=(insert_one
const& lhs, insert_one
const& rhs) {
100 return !(lhs == rhs);
120 return {std::move(v)};
A non-owning variant that can contain any BSON type.
Definition view.hpp:62
The result of an "insertOne" operation.
Definition insert_one_result.hpp:45
The result of a MongoDB bulk write operation.
Definition bulk_write.hpp:43
The result of a MongoDB insert operation.
Definition insert_one.hpp:41
insert_one(v_noabi::result::bulk_write result, bsoncxx::v_noabi::types::view inserted_id)
Definition insert_one.hpp:64
bsoncxx::v_noabi::types::bson_value::view const & inserted_id() const
Gets the _id of the inserted document.
Definition insert_one.hpp:91
v_noabi::result::bulk_write const & result() const
Returns the bulk write result for this insert operation.
Definition insert_one.hpp:82
operator v1::insert_one_result() const
Convert to the mongocxx::v1 equivalent.
Provides mongocxx::v1::insert_one_result.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
v_noabi::types::bson_value::view view
Equivalent to bsoncxx::v_noabi::types::bson_value::view.
Definition view-fwd.hpp:35
bson_value::value value
Equivalent to bsoncxx::v_noabi::types::bson_value::value.
Definition value-fwd.hpp:35
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing the result of various commands.
Declares entities whose ABI stability is NOT guaranteed.
bool operator==(std::string str, hint const &hint)
Convenience methods to compare against an index name.
Definition hint.hpp:138
bool operator!=(hint const &hint, std::string str)
Convenience methods to compare against an index name.
Definition hint.hpp:143
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::result::insert_one.
Provides entities used to represent BSON types.
Provides bsoncxx::v_noabi::array::value.
Provides bsoncxx::v_noabi::types::bson_value::value.
Provides bsoncxx::v_noabi::types::bson_value::view.
Provides mongocxx::v_noabi::result::bulk_write.