MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::model::insert_one Class Reference

#include <mongocxx/v_noabi/mongocxx/model/insert_one.hpp>

Description

A MongoDB insert operation that creates a single document.

Public Member Functions

 insert_one (bsoncxx::v_noabi::document::view_or_value document)
 Constructs an insert operation that will create a single document.
 insert_one (v1::bulk_write::insert_one op)
 Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::document::view_or_value const & document () const
 Gets the document to be inserted.
 operator v1::bulk_write::insert_one () const
 Convert to the mongocxx::v1 equivalent.

Constructor & Destructor Documentation

◆ insert_one() [1/2]

◆ insert_one() [2/2]

Constructs an insert operation that will create a single document.

Parameters
documentThe document to insert.

Member Function Documentation

◆ document()

Gets the document to be inserted.

Returns
The document to be inserted.

◆ operator v1::bulk_write::insert_one()

mongocxx::v_noabi::model::insert_one::operator v1::bulk_write::insert_one ( ) const
inlineexplicit

Convert to the mongocxx::v1 equivalent.


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