48 using id_map = std::map<std::size_t, bsoncxx::v_noabi::document::element>;
50 ~insert_many()
noexcept =
default;
52 insert_many(insert_many&& other)
noexcept =
default;
54 insert_many& operator=(insert_many&& other) =
default;
56 insert_many(insert_many
const& other) : _result{other._result}, _inserted_ids{other._inserted_ids} {
60 insert_many& operator=(insert_many
const& other) {
62 _result = other._result;
63 _inserted_ids = other._inserted_ids;
103 return _result.inserted_count();
120 return !(lhs == rhs);
129 std::size_t index = 0;
130 for (
auto const& ele : _inserted_ids) {
148 return {std::move(v)};
Provides bsoncxx::v_noabi::array::element.
A read-only BSON array that owns its underlying buffer.
Definition value.hpp:44
The result of an "insertMany" operation.
Definition insert_many_result.hpp:45
The result of a MongoDB bulk write operation.
Definition bulk_write.hpp:43
The result of a MongoDB insert many operation.
Definition insert_many.hpp:46
operator v1::insert_many_result() const
Convert to the mongocxx::v1 equivalent.
std::int32_t inserted_count() const
Gets the number of documents that were inserted during this operation.
Definition insert_many.hpp:102
id_map inserted_ids() const
Gets the _ids of the inserted documents.
Definition insert_many.hpp:113
v_noabi::result::bulk_write const & result() const
Returns the bulk write result for this insert many operation.
Definition insert_many.hpp:93
Provides bsoncxx::v_noabi::document::element.
Declares mongocxx::v_noabi::result::insert_many.
Provides mongocxx::v1::insert_many_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.
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
The top-level namespace within which all bsoncxx library entities are declared.
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.
Provides entities used to represent BSON types.
Provides bsoncxx::v_noabi::array::value.
Declares mongocxx::v_noabi::collection.
Provides mongocxx::v_noabi::result::bulk_write.