MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
bsoncxx::v_noabi::builder::basic Namespace Reference

Description

Declares entities used with "basic" BSON builder syntax.

Classes

class  array
 A traditional builder-style interface for constructing a BSON array. More...
 
class  document
 A traditional builder-style interface for constructing a BSON document. More...
 
class  sub_array
 An internal class of builder::basic. Users should almost always construct a builder::basic::array instead. More...
 
class  sub_document
 An internal class of builder::basic. Users should almost always construct a builder::basic::document instead. More...
 

Functions

template<typename T , typename U >
std::tuple< T &&, U && > kvp (T &&t, U &&u)
 Constructs a key-value pair from a string key and a BSON value.
 
template<typename... Args>
bsoncxx::v_noabi::array::value make_array (Args &&... args)
 Creates an array from a list of elements.
 
template<typename... Args>
bsoncxx::v_noabi::document::value make_document (Args &&... args)
 Creates a document from a list of key-value pairs.
 

Function Documentation

◆ kvp()

template<typename T , typename U >
std::tuple< T &&, U && > bsoncxx::v_noabi::builder::basic::kvp ( T && t,
U && u )

Constructs a key-value pair from a string key and a BSON value.

◆ make_array()

template<typename... Args>
bsoncxx::v_noabi::array::value bsoncxx::v_noabi::builder::basic::make_array ( Args &&... args)

Creates an array from a list of elements.

Parameters
argsA variadiac list of elements. The types of the elements can be anything that builder::basic::sub_array::append accepts.
Returns
A bsoncxx::v_noabi::array::value containing the elements.

◆ make_document()

template<typename... Args>
bsoncxx::v_noabi::document::value bsoncxx::v_noabi::builder::basic::make_document ( Args &&... args)

Creates a document from a list of key-value pairs.

Parameters
argsA variadic list of key-value pairs. The types of the keys and values can be anything that builder::basic::sub_document::append accepts.
Returns
A bsoncxx::v_noabi::document::value containing the elements.