Mangrove
The C++ Object Document Mapper for MongoDB
Public Member Functions | List of all members
mangrove::expression_list< list_type, Args > Class Template Reference

This represents a list of expressions. More...

#include <query_builder.hpp>

Public Member Functions

 expression_list (const Args &...args)
 Constructs an expression list of the given arguments. More...
 
void append_to_bson (bsoncxx::builder::core &builder, bool wrap=false) const
 Appends each element to a BSON code builder. More...
 
 operator bsoncxx::document::view_or_value () const
 Casts the expression list to a BSON query of the form { expr1, expr2, .... More...
 

Detailed Description

template<expression_category list_type, typename... Args>
class mangrove::expression_list< list_type, Args >

This represents a list of expressions.

Template Parameters
list_typeThe category of the expressions, such as "update" or "query".
Args...The types of the various expressions that make up the list.

Constructor & Destructor Documentation

template<expression_category list_type, typename... Args>
mangrove::expression_list< list_type, Args >::expression_list ( const Args &...  args)
inline

Constructs an expression list of the given arguments.

Template Parameters
argsThe individual elements of the list.

Member Function Documentation

template<expression_category list_type, typename... Args>
void mangrove::expression_list< list_type, Args >::append_to_bson ( bsoncxx::builder::core &  builder,
bool  wrap = false 
) const
inline

Appends each element to a BSON code builder.

Parameters
builderA code BSON builder
wrapWhether to wrap individual elements inside a BSON document, e.g. "{elt1...}, {elt2, ...}, ..."
template<expression_category list_type, typename... Args>
mangrove::expression_list< list_type, Args >::operator bsoncxx::document::view_or_value ( ) const
inline

Casts the expression list to a BSON query of the form { expr1, expr2, ....

}


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