48 lines
913 B
C++
48 lines
913 B
C++
#ifndef QUERY_QUERY_DATA_HPP
|
|
#define QUERY_QUERY_DATA_HPP
|
|
|
|
#include "matador/object/attribute.hpp"
|
|
#include "matador/object/object_resolver_factory.hpp"
|
|
|
|
#include "matador/utils/types.hpp"
|
|
|
|
namespace matador::sql {
|
|
enum class sql_command {
|
|
Unknown,
|
|
Create,
|
|
CreateTable,
|
|
CreateSchema,
|
|
CreateDatabase,
|
|
Update,
|
|
Insert,
|
|
Delete,
|
|
Select,
|
|
Drop,
|
|
DropTable,
|
|
DropSchema,
|
|
DropDatabase,
|
|
Alter,
|
|
AlterTable,
|
|
AlterSchema
|
|
};
|
|
|
|
struct sql_command_info {
|
|
std::string sql;
|
|
sql_command command{};
|
|
};
|
|
|
|
struct query_context {
|
|
std::string sql;
|
|
sql_command command{};
|
|
std::string command_name{};
|
|
std::string schema_name{};
|
|
std::string table_name{};
|
|
std::vector<object::attribute> prototype{};
|
|
std::vector<std::string> bind_vars{};
|
|
std::vector<utils::database_type> bind_types{};
|
|
std::shared_ptr<object::object_resolver_factory> resolver_factory{};
|
|
};
|
|
}
|
|
|
|
#endif //QUERY_QUERY_DATA_HPP
|