![]() |
Mangrove
The C++ Object Document Mapper for MongoDB
|
This class represents a boolean expression over an array of arguments. More...
#include <query_builder.hpp>
Public Member Functions | |
constexpr | boolean_list_expr (const List args, const char *op) |
Constructs a boolean expression from a list of sub-expressions, and a certain operator. More... | |
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: [{lhs}, {rhs}]". More... | |
operator bsoncxx::document::view_or_value () const | |
Converts the expression to a BSON filter for a query, in the form "{$op: [{arg1}, {arg2}, ...]}". | |
This class represents a boolean expression over an array of arguments.
This is particularly useful for the $nor operator. When converted to BSON, this class produces an expression {$op: [{arg1}, {arg2}, ...]}
|
inline |
Constructs a boolean expression from a list of sub-expressions, and a certain operator.
args | An expression list of boolean conditions. |
op | The operator of the expression, e.g. AND or OR. |
|
inline |
Appends this query to a BSON core builder as a key-value pair "$op: [{lhs}, {rhs}]".
builder | A basic BSON core builder. |
wrap | Whether to wrap this expression inside a document. |