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

Represents an update operator that modifies a certain elements. More...

#include <query_builder.hpp>

+ Inheritance diagram for mangrove::update_expr< NvpT, U >:

Public Member Functions

void append_to_bson (bsoncxx::builder::core &builder, bool wrap=false) const
 Appends this query to a BSON core builder as a key-value pair "$op: {field: value}". More...
 
 operator bsoncxx::document::view_or_value () const
 Creates a BSON value of the form "$op: {field: value}".
 

Detailed Description

template<typename NvpT, typename U>
class mangrove::update_expr< NvpT, U >

Represents an update operator that modifies a certain elements.

This creates BSON expressions of the form "$op: {field: value}", where $op can be $set, $inc, etc.

This class stores the value to be compared by reference. To store a temporary or computed value, use UpdateExprValue.

Template Parameters
NvpTThe type of the name-value pair
UThe type of the value being compared.

Member Function Documentation

template<typename NvpT, typename U>
void mangrove::update_expr< NvpT, U >::append_to_bson ( bsoncxx::builder::core &  builder,
bool  wrap = false 
) const
inline

Appends this query to a BSON core builder as a key-value pair "$op: {field: value}".

Parameters
builderA basic BSON core builder.
Whetherto wrap this expression inside a document.

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