Mangrove
The C++ Object Document Mapper for MongoDB
List of all members
mangrove::comparison_value_expr< NvpT, U > Class Template Reference

Represents a comparison expression as above, but stores a value instead of a reference. More...

#include <query_builder.hpp>

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

Additional Inherited Members

- Public Member Functions inherited from mangrove::comparison_expr< NvpT, U >
constexpr comparison_expr (const NvpT &nvp, const U &field, const char *op)
 Constructs a query expression for the given key, value, and comparison type. More...
 
constexpr comparison_expr (const comparison_expr &expr, const char *op)
 Takes a comparison expression, and creates a new one with a different operator, but the same value and field. More...
 
std::string & append_name (std::string &s) const
 Appends the name of the contained field to a string.
 
void append_to_bson (bsoncxx::builder::core &builder, bool wrap=false, bool omit_name=false) const
 Appends this expression to a BSON core builder, as a key-value pair of the form "key: {$cmp: val}", where $cmp is some comparison operator. More...
 
 operator bsoncxx::document::view_or_value () const
 Converts the expression to a BSON filter for a query. More...
 

Detailed Description

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

Represents a comparison expression as above, but stores a value instead of a reference.

This is useful for storing temporary or computed values. Internally, it uses a comparison_expr whose value is a b_regex.


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