initial matador ng commit

This commit is contained in:
2025-02-02 20:37:12 +01:00
parent 19de5714f4
commit ded3daceb3
378 changed files with 14913 additions and 13431 deletions
+21 -3
View File
@@ -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