renamed binary_operator to be pascal case
This commit is contained in:
@@ -13,61 +13,61 @@ namespace matador::query {
|
||||
criteria_ptr operator==(const table_column &col, const utils::identifier &id) {
|
||||
utils::identifier_to_value_converter conv;
|
||||
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::EQUALS, conv.convert(id));
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::Equals, conv.convert(id));
|
||||
}
|
||||
|
||||
criteria_ptr operator!=(const table_column &col, const utils::identifier &id) {
|
||||
utils::identifier_to_value_converter conv;
|
||||
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::NOT_EQUALS, conv.convert(id));
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::NotEquals, conv.convert(id));
|
||||
}
|
||||
|
||||
criteria_ptr operator==(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::EQUALS, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::Equals, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator!=(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::NOT_EQUALS, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::NotEquals, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator>(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::GREATER_THAN, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::GreaterThan, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator>=(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::GREATER_THAN_OR_EQUAL, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::GreaterThanOrEqual, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator<(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::LESS_THAN, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::LessThan, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator<=(const table_column &col, utils::placeholder p) {
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::LESS_THAN_OR_EQUAL, p);
|
||||
return std::make_unique<binary_criteria>(col, binary_operator::LessThanOrEqual, p);
|
||||
}
|
||||
|
||||
criteria_ptr operator==( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::EQUALS, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::Equals, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator!=( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::NOT_EQUALS, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::NotEquals, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator>( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::GREATER_THAN, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::GreaterThan, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator>=( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::GREATER_THAN_OR_EQUAL, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::GreaterThanOrEqual, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator<( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::LESS_THAN, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::LessThan, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator<=( const table_column& col_left, const table_column& col_right ) {
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::LESS_THAN_OR_EQUAL, col_right);
|
||||
return std::make_unique<binary_column_criteria>(col_left, binary_operator::LessThanOrEqual, col_right);
|
||||
}
|
||||
|
||||
criteria_ptr operator&&(criteria_ptr left, criteria_ptr right) {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
namespace matador::query {
|
||||
namespace detail {
|
||||
static const utils::enum_mapper<binary_operator> BinaryOperatorEnum({
|
||||
{binary_operator::EQUALS, "="},
|
||||
{binary_operator::NOT_EQUALS, "<>"},
|
||||
{binary_operator::GREATER_THAN, ">"},
|
||||
{binary_operator::GREATER_THAN_OR_EQUAL, ">="},
|
||||
{binary_operator::LESS_THAN, "<"},
|
||||
{binary_operator::LESS_THAN_OR_EQUAL, "<="},
|
||||
{binary_operator::Equals, "="},
|
||||
{binary_operator::NotEquals, "<>"},
|
||||
{binary_operator::GreaterThan, ">"},
|
||||
{binary_operator::GreaterThanOrEqual, ">="},
|
||||
{binary_operator::LessThan, "<"},
|
||||
{binary_operator::LessThanOrEqual, "<="},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void select_query_builder::append_join(const table_column &left, const table_col
|
||||
using namespace matador::query;
|
||||
entity_query_data_.joins.push_back({
|
||||
right.table(),
|
||||
std::make_unique<binary_column_criteria>(left, binary_operator::EQUALS, right)
|
||||
std::make_unique<binary_column_criteria>(left, binary_operator::Equals, right)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user