initial matador ng commit
This commit is contained in:
@@ -1,21 +1,39 @@
|
||||
#ifndef QUERY_QUERY_CONTEXT_HPP
|
||||
#define QUERY_QUERY_CONTEXT_HPP
|
||||
#ifndef QUERY_QUERY_DATA_HPP
|
||||
#define QUERY_QUERY_DATA_HPP
|
||||
|
||||
#include "matador/sql/column_definition.hpp"
|
||||
#include "matador/sql/table.hpp"
|
||||
|
||||
#include "matador/utils/types.hpp"
|
||||
|
||||
namespace matador::sql {
|
||||
|
||||
enum class sql_command {
|
||||
SQL_CMD_UNKNOWN,
|
||||
SQL_CMD_CREATE,
|
||||
SQL_CMD_UPDATE,
|
||||
SQL_CMD_INSERT,
|
||||
SQL_CMD_DELETE,
|
||||
SQL_CMD_SELECT,
|
||||
SQL_CMD_DROP,
|
||||
SQL_CMD_ALTER
|
||||
};
|
||||
|
||||
struct query_context
|
||||
{
|
||||
std::string sql;
|
||||
sql_command command{};
|
||||
std::string command_name;
|
||||
sql::table table{""};
|
||||
std::vector<column_definition> prototype;
|
||||
std::vector<std::string> result_vars;
|
||||
std::vector<std::string> bind_vars;
|
||||
std::vector<utils::database_type> bind_types;
|
||||
|
||||
std::unordered_map<std::string, std::string> column_aliases;
|
||||
std::unordered_map<std::string, std::string> table_aliases;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //QUERY_QUERY_CONTEXT_HPP
|
||||
#endif //QUERY_QUERY_DATA_HPP
|
||||
|
||||
Reference in New Issue
Block a user