2013-08-07 13:07:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Storages/IStorage.h>
|
|
|
|
#include <DB/Interpreters/Context.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2014-04-02 18:53:30 +00:00
|
|
|
class ASTIdentifier;
|
2013-08-07 13:07:42 +00:00
|
|
|
|
2013-08-08 23:49:59 +00:00
|
|
|
/** Позволяет добавить или удалить столбец в таблице.
|
2013-08-07 13:07:42 +00:00
|
|
|
*/
|
|
|
|
class InterpreterAlterQuery
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InterpreterAlterQuery(ASTPtr query_ptr_, Context & context_);
|
|
|
|
|
|
|
|
void execute();
|
|
|
|
|
|
|
|
private:
|
2014-04-02 18:53:30 +00:00
|
|
|
void dropColumnFromAST(const ASTIdentifier & drop_column, ASTs & columns);
|
|
|
|
|
2013-08-07 13:07:42 +00:00
|
|
|
ASTPtr query_ptr;
|
|
|
|
|
|
|
|
Context context;
|
|
|
|
};
|
|
|
|
}
|