![]() |
Mangrove
The C++ Object Document Mapper for MongoDB
|
This represents a boolean expression with two arguments. More...
#include <query_builder.hpp>
Public Member Functions | |
constexpr | boolean_expr (const Expr1 &lhs, const Expr2 &rhs, const char *op) |
Constructs a boolean expression from two other 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: [{lhs}, {rhs}] }". | |
This represents a boolean expression with two arguments.
The arguments can, in turn, be boolean expressions.
|
inline |
Constructs a boolean expression from two other expressions, and a certain operator.
lhs | The left-hand side of the expression. |
rhs | The right-hand side of the expression. |
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. |
Whether | to wrap this expression inside a document. |