An expression that uses the $addToSet operator to add unique elements to an array.
More...
#include <query_builder.hpp>
template<typename NvpT, typename U>
class mangrove::add_to_set_update_expr< NvpT, U >
An expression that uses the $addToSet operator to add unique elements to an array.
- Template Parameters
-
NvpT | The name-value pair to use |
U | The type of the value to pass to $addToSet |
template<typename NvpT , typename U >
Constructs an add_to_set_update_expr with the given parameters.
- Parameters
-
nvp | The given field. |
val | The value to add to the field. |
each | Whether to use the $each modifier. |
template<typename NvpT , typename U >
Appends this query to a BSON core builder as an expression '.
- addToSet
- {field: value | {
each: value}}'
- Parameters
-
builder | A basic BSON core builder. |
wrap | Whether to wrap this expression inside a document. |
The documentation for this class was generated from the following files: