fixed backend tests
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "matador/sql/query_context.hpp"
|
||||
|
||||
#include "matador/utils/placeholder.hpp"
|
||||
|
||||
namespace matador::sql {
|
||||
class connection_impl;
|
||||
class dialect;
|
||||
@@ -14,6 +16,7 @@ class dialect;
|
||||
namespace matador::query {
|
||||
|
||||
struct query_data;
|
||||
struct value_visitor;
|
||||
|
||||
class query_compiler final : public query_part_visitor
|
||||
{
|
||||
@@ -52,6 +55,8 @@ protected:
|
||||
|
||||
static std::string build_table_name(sql::dialect_token token, const sql::dialect &d, const sql::table& t);
|
||||
|
||||
std::string determine_value(value_visitor &visitor, const std::variant<utils::placeholder, utils::database_type> &val);
|
||||
|
||||
protected:
|
||||
const query_data *data_{};
|
||||
sql::query_context query_;
|
||||
|
||||
@@ -5,17 +5,25 @@
|
||||
#include <vector>
|
||||
|
||||
#include "matador/object/attribute_definition.hpp"
|
||||
|
||||
#include "matador/sql/table.hpp"
|
||||
|
||||
#include "matador/query/query_part.hpp"
|
||||
|
||||
namespace matador::query {
|
||||
struct query_data
|
||||
{
|
||||
std::vector<std::unique_ptr<query_part>> parts{};
|
||||
std::vector<object::attribute_definition> columns{};
|
||||
std::unordered_map<std::string, sql::table> tables{};
|
||||
|
||||
enum struct query_mode {
|
||||
Direct = 0,
|
||||
Prepared = 1
|
||||
};
|
||||
|
||||
struct query_data {
|
||||
std::vector<std::unique_ptr<query_part>> parts{};
|
||||
std::vector<object::attribute_definition> columns{};
|
||||
std::unordered_map<std::string, sql::table> tables{};
|
||||
query_mode mode = query_mode::Direct;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //QUERY_DATA_HPP
|
||||
|
||||
Reference in New Issue
Block a user