MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::insert_many_result Class Reference

#include <mongocxx/v1/insert_many_result.hpp>

Description

The result of an "insertMany" operation.

Supported fields include:

See also
Attention
This feature is experimental! It is not ready for use!

Public Types

using id_map = std::map<std::int64_t, bsoncxx::v1::types::view>
 A map from the operation index to the inserted document ID.

Public Member Functions

 insert_many_result (insert_many_result &&other) noexcept
 Move constructor.
 insert_many_result (insert_many_result const &other)
 Copy construction.
 ~insert_many_result ()
 Destroy this object.
std::int64_t inserted_count () const
 Return the number of inserted documents.
id_map inserted_ids () const
 Return a map from the operation index to the inserted document ID.
insert_many_resultoperator= (insert_many_result &&other) noexcept
 Move assignment.
insert_many_resultoperator= (insert_many_result const &other)
 Copy assignment.
v1::bulk_write::result result () const
 Return the raw bulk write result.

Friends

bool operator== (insert_many_result const &lhs, insert_many_result const &rhs)
 Compare equal when all supported fields compare equal.
bool operator!= (insert_many_result const &lhs, insert_many_result const &rhs)
 Compare equal when all supported fields compare equal.

Member Typedef Documentation

◆ id_map

A map from the operation index to the inserted document ID.

Constructor & Destructor Documentation

◆ ~insert_many_result()

mongocxx::v1::insert_many_result::~insert_many_result ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ insert_many_result() [1/2]

mongocxx::v1::insert_many_result::insert_many_result ( insert_many_result && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ insert_many_result() [2/2]

mongocxx::v1::insert_many_result::insert_many_result ( insert_many_result const & other)

Copy construction.

Member Function Documentation

◆ inserted_count()

std::int64_t mongocxx::v1::insert_many_result::inserted_count ( ) const

Return the number of inserted documents.

◆ inserted_ids()

id_map mongocxx::v1::insert_many_result::inserted_ids ( ) const

Return a map from the operation index to the inserted document ID.

◆ operator=() [1/2]

insert_many_result & mongocxx::v1::insert_many_result::operator= ( insert_many_result && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

insert_many_result & mongocxx::v1::insert_many_result::operator= ( insert_many_result const & other)

Copy assignment.

◆ result()

v1::bulk_write::result mongocxx::v1::insert_many_result::result ( ) const

Return the raw bulk write result.

◆ operator!=

bool operator!= ( insert_many_result const & lhs,
insert_many_result const & rhs )
friend

Compare equal when all supported fields compare equal.

◆ operator==

bool operator== ( insert_many_result const & lhs,
insert_many_result const & rhs )
friend

Compare equal when all supported fields compare equal.


The documentation for this class was generated from the following file: