Mangrove
The C++ Object Document Mapper for MongoDB
List of all members
mangrove::free_nvp< T > Class Template Reference

Represents a field that does not have a name, i.e. More...

#include <nvp.hpp>

+ Inheritance diagram for mangrove::free_nvp< T >:

Additional Inherited Members

- Public Member Functions inherited from mangrove::nvp_base< free_nvp< T >, T >
constexpr nvp_child< iterable_value_t< no_opt_type >, U, free_nvp< T > > operator->* (const nvp< iterable_value_t< no_opt_type >, U > &child) const
 Chains two name-value pairs to access a sub-field, i.e. More...
 
constexpr sort_expr< free_nvp< T > > sort (bool ascending) const
 Creates a sort expression that sorts documents by this field. More...
 
constexpr comparison_expr< free_nvp< T >, Iterable > in (const Iterable &iter) const
 Creates an expression that checks whether the value of this field matches any value in the given iterable. More...
 
constexpr comparison_expr< free_nvp< T >, Iterable > nin (const Iterable &iter) const
 Creates an expression that checks whether the value of this field matches none of the values in the given iterable. More...
 
constexpr comparison_expr< free_nvp< T >, bool > exists (const bool &exists) const
 Creates an expression that checks the existence of a certain field. More...
 
constexpr mod_expr< free_nvp< T > > mod (const int &divisor, const int &remainder) const
 Creates a mod_expr that represents a query with the $mod operator. More...
 
constexpr comparison_value_expr< free_nvp< T >, bsoncxx::types::b_regex > regex (const char *regex, const char *options) const
 Creates a comparison expression that represents a query with a $regex operator. More...
 
constexpr comparison_expr< free_nvp< T >, Iterable > all (const Iterable &iter) const
 Creates a query with the $all operator that compares values in this field's array to values in another array. More...
 
constexpr comparison_expr< free_nvp< T >, Expr > elem_match (const Expr &queries) const
 Creates a query with the $elemMatch operator that finds elements in this field that match the given queries. More...
 
constexpr free_nvp< iterable_value_t< no_opt_type > > element () const
 Constructs a nameless name-value-pair that corresponds to an element in a scalar array, if this field is an array. More...
 
constexpr comparison_expr< free_nvp< T >, std::int64_t > size (const std::int64_t &n) const
 Creates an array query expression with the $size operator. More...
 
constexpr comparison_expr< free_nvp< T >, Mask > bits_all_set (const Mask &bitmask) const
 Creates a query that uses the $bitsAllSet operator to check a numerical field with a bitmask. More...
 
constexpr comparison_value_expr< free_nvp< T >, std::int64_t > bits_all_set (std::int64_t pos1, std::int64_t pos2, Args...positions) const
 Creates a query that uses the $bitsAllSet operator to check a series of bits, given as bit positions. More...
 
constexpr comparison_expr< free_nvp< T >, Mask > bits_any_set (const Mask &bitmask) const
 Creates a query that uses the $bitsAnySet operator to check a numerical field with a bitmask. More...
 
constexpr comparison_value_expr< free_nvp< T >, std::int64_t > bits_any_set (std::int64_t pos1, std::int64_t pos2, Args...positions) const
 Creates a query that uses the $bitsAnySet operator to check a series of bits, given as bit positions. More...
 
constexpr comparison_value_expr< free_nvp< T >, Mask > bits_all_clear (const Mask &bitmask) const
 Creates a query that uses the $bitsAllClear operator to check a numerical field with a bitmask. More...
 
constexpr comparison_value_expr< free_nvp< T >, std::int64_t > bits_all_clear (std::int64_t pos1, std::int64_t pos2, Args...positions) const
 Creates a query that uses the $bitsAllClear operator to check a series of bits, given as bit positions. More...
 
constexpr comparison_expr< free_nvp< T >, Mask > bits_any_clear (const Mask &bitmask) const
 Creates a query that uses the $bitsAnyClear operator to check a numerical field with a bitmask. More...
 
constexpr comparison_value_expr< free_nvp< T >, std::int64_t > bits_any_clear (std::int64_t pos1, std::int64_t pos2, Args...positions) const
 Creates a query that uses the $bitsAnyClear operator to check a series of bits, given as bit positions. More...
 
constexpr unset_expr< free_nvp< T > > unset () const
 Creates an expression that unsets the current field. More...
 
constexpr update_expr< free_nvp< T >, no_opt_type > min (const no_opt_type &val) const
 Creates an expression that uses the $min operator to only update a field if the new value is lower than the current value. More...
 
constexpr update_expr< free_nvp< T >, no_opt_type > max (const no_opt_type &val) const
 Creates an expression that uses the $max operator to only update a field if the new value is greater than the current value. More...
 
constexpr dollar_operator_nvp< free_nvp< T > > first_match () const
 Returns a name-value pair with the $ operator appended to it. More...
 
constexpr update_value_expr< free_nvp< T >, int > pop (bool last) const
 Creates an update expression with the $pop operator. More...
 
constexpr update_expr< free_nvp< T >, iterable_value_t< no_opt_type > > pull (const iterable_value_t< no_opt_type > &val) const
 Creates an update expression with the $pull operator, that removes an element if it matches the given value exactly. More...
 
constexpr std::enable_if_t< details::is_query_expression_v< Expr >, update_expr< free_nvp< T >, Expr > > pull (const Expr &expr) const
 Creates an update expression with the $pull operator, that removes an element if it matches the given query. More...
 
constexpr update_expr< free_nvp< T >, Iterable > pull_all (const Iterable &iter) const
 Creates an update expression with the $pull operator, that removes an element if it matches the given value exactly. More...
 
constexpr add_to_set_update_expr< free_nvp< T >, iterable_value_t< no_opt_type > > add_to_set (const iterable_value_t< no_opt_type > &val) const
 Creates an update expression with the $addToSet operator, that adds a single value to an array, if it is unique. More...
 
constexpr add_to_set_update_expr< free_nvp< T >, Iterable > add_to_set (const Iterable &iter) const
 Creates an update expression with the $addToSet operator and the $each modifier, that adds a list of value to an array, only keeping the unique values. More...
 
constexpr push_update_expr< free_nvp< T >, iterable_value_t< no_opt_type > > push (const iterable_value_t< no_opt_type > &val) const
 Creates an update epxression with the $push operator, that adds a single value to an array. More...
 
constexpr push_update_expr< free_nvp< T >, Iterable, Sort > push (const Iterable &iter, bsoncxx::stdx::optional< std::int32_t > slice=bsoncxx::stdx::nullopt, const bsoncxx::stdx::optional< Sort > &sort=bsoncxx::stdx::nullopt, bsoncxx::stdx::optional< std::uint32_t > position=bsoncxx::stdx::nullopt) const
 Creates an update epxression with the $push operator and the $each modifier, that adds a list of value to an array. More...
 

Detailed Description

template<typename T>
class mangrove::free_nvp< T >

Represents a field that does not have a name, i.e.

an array element. This is used in $elemMatch expressions on scalar arrays, where the elements can be compared but don't have fields of their own.

Template Parameters
TThe type of the field.

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