MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::result::insert_many Class Reference

#include <mongocxx/v_noabi/mongocxx/result/insert_many.hpp>

Description

Class representing the result of a MongoDB insert many operation (executed as a bulk write).

Public Member Functions

std::int32_t inserted_count () const
 Gets the number of documents that were inserted during this operation.
 
id_map inserted_ids () const
 Gets the _ids of the inserted documents.
 
const result::bulk_writeresult () const
 Returns the bulk write result for this insert many operation.
 

Member Function Documentation

◆ inserted_count()

std::int32_t mongocxx::v_noabi::result::insert_many::inserted_count ( ) const

Gets the number of documents that were inserted during this operation.

Returns
The number of documents that were inserted.

◆ inserted_ids()

id_map mongocxx::v_noabi::result::insert_many::inserted_ids ( ) const

Gets the _ids of the inserted documents.

Note
The returned id_map must not be accessed after the result::insert_many object is destroyed.
Returns
Map of the index of the operation to the _id of the inserted document.

◆ result()

const result::bulk_write & mongocxx::v_noabi::result::insert_many::result ( ) const

Returns the bulk write result for this insert many operation.

Returns
The raw bulk write result.

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