removed condition classes, functions and operators
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "matador/orm/error_code.hpp"
|
||||
#include "matador/orm/session_query_builder.hpp"
|
||||
|
||||
#include "matador/query/condition.hpp"
|
||||
#include "matador/query/criteria.hpp"
|
||||
#include "matador/query/query.hpp"
|
||||
|
||||
#include "matador/sql/column_generator.hpp"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "matador/orm/query_builder_exception.hpp"
|
||||
|
||||
#include "matador/query/condition.hpp"
|
||||
#include "matador/query/criteria.hpp"
|
||||
#include "matador/query/query_intermediates.hpp"
|
||||
|
||||
#include "matador/object/repository.hpp"
|
||||
@@ -14,8 +14,8 @@
|
||||
namespace matador::orm {
|
||||
struct entity_insert_data {
|
||||
sql::table table;
|
||||
std::vector<std::string> columns;
|
||||
std::vector<utils::database_type> values;
|
||||
std::vector<std::string> columns{};
|
||||
std::vector<utils::database_type> values{};
|
||||
};
|
||||
|
||||
enum class insert_build_error : std::uint8_t {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "matador/orm/query_builder_exception.hpp"
|
||||
|
||||
#include "matador/query/condition.hpp"
|
||||
#include "matador/query/criteria.hpp"
|
||||
#include "matador/query/query.hpp"
|
||||
|
||||
#include "matador/sql/executor.hpp"
|
||||
@@ -27,7 +27,7 @@ struct entity_query_data {
|
||||
std::vector<sql::column> columns{};
|
||||
std::unordered_map<std::string, sql::statement> lazy_loading_statements{};
|
||||
std::vector<query::join_data> joins{};
|
||||
std::unique_ptr<query::basic_condition> where_clause{};
|
||||
query::criteria_ptr where_clause;
|
||||
};
|
||||
|
||||
class session_query_builder final {
|
||||
@@ -87,8 +87,9 @@ public:
|
||||
}
|
||||
entity_query_data_.pk_column_name = id;
|
||||
if (!pk_.is_null()) {
|
||||
auto c = sql::column{table_info_stack_.top().table, id, ""};
|
||||
auto co = std::make_unique<query::condition<sql::column, utils::placeholder>>(c, query::basic_condition::operand_type::EQUAL, utils::_);
|
||||
const auto c = sql::column{table_info_stack_.top().table, id, ""};
|
||||
using namespace matador::query;
|
||||
auto co = c == utils::_;
|
||||
entity_query_data_.where_clause = std::move(co);
|
||||
}
|
||||
}
|
||||
@@ -240,13 +241,13 @@ private:
|
||||
std::shared_ptr<sql::table> table;
|
||||
};
|
||||
|
||||
std::stack<table_info> table_info_stack_;
|
||||
std::unordered_map<std::string, std::shared_ptr<sql::table>> processed_tables_;
|
||||
std::stack<table_info> table_info_stack_{};
|
||||
std::unordered_map<std::string, std::shared_ptr<sql::table>> processed_tables_{};
|
||||
const object::repository &schema_;
|
||||
entity_query_data entity_query_data_;
|
||||
entity_query_data entity_query_data_{};
|
||||
unsigned int column_index{0};
|
||||
unsigned int table_index{0};
|
||||
object::join_columns_collector join_columns_collector_;
|
||||
object::join_columns_collector join_columns_collector_{};
|
||||
sql::executor &executor_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user