|
constexpr | push_update_expr (const NvpT &nvp, const U &val, bool each, 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) |
| Constructs a $push expression, with the given optional modifiers. More...
|
|
constexpr push_update_expr< NvpT, U, Sort > | slice (std::int32_t slice) |
| Create a copy of this expression with a different $slice modifier value. More...
|
|
constexpr push_update_expr< NvpT, U, Sort > | slice () |
| Create a copy of this expression without a $slice modifier. More...
|
|
template<typename OtherNvpT > |
constexpr push_update_expr< NvpT, U, sort_expr< OtherNvpT > > | sort (const sort_expr< OtherNvpT > &sort) |
| Create a copy of this expression with a different $sort modifier value. More...
|
|
constexpr push_update_expr< NvpT, U, int > | sort (int sort) |
| Create a copy of this expression with a different $slice modifier value. More...
|
|
constexpr push_update_expr< NvpT, U, Sort > | sort () |
| Create a copy of this expression without a $sort modifier. More...
|
|
constexpr push_update_expr< NvpT, U, Sort > | position (std::uint32_t position) |
| Create a copy of this expression with a different $position modifier value. More...
|
|
constexpr push_update_expr< NvpT, U, Sort > | position () |
| Create a copy of this expression without $position modifier. More...
|
|
void | append_to_bson (bsoncxx::builder::core &builder, bool wrap=false) const |
| Appends this query to a BSON core builder as an expression '. More...
|
|
template<typename NvpT, typename U, typename Sort>
class mangrove::push_update_expr< NvpT, U, Sort >
Represents an array update epression that uses the $push operator.
Modifiers can be set either in the constructor, or by calling the corresponding member functions.
- Template Parameters
-
NvpT | The name-value-pair type of the corresponding field. |
U | The value being $push'ed to the array |
Sort | The type of the sort expression used in the $sort modifier. This can be either an integer, +/- 1, or a sort_expr. |