ClickHouse/src/Interpreters/InterpreterAlterQuery.h

35 lines
745 B
C++
Raw Normal View History

2013-08-07 13:07:42 +00:00
#pragma once
#include <Interpreters/IInterpreter.h>
2019-03-11 14:01:45 +00:00
#include <Parsers/IAST_fwd.h>
2013-08-07 13:07:42 +00:00
namespace DB
{
2018-12-25 23:11:36 +00:00
class Context;
2020-01-24 16:20:36 +00:00
class AccessRightsElements;
class ASTAlterCommand;
2020-01-24 16:20:36 +00:00
2018-12-25 23:11:36 +00:00
2017-06-02 21:37:28 +00:00
/** Allows you add or remove a column in the table.
* It also allows you to manipulate the partitions of the MergeTree family tables.
2013-08-07 13:07:42 +00:00
*/
2015-06-18 02:11:05 +00:00
class InterpreterAlterQuery : public IInterpreter
2013-08-07 13:07:42 +00:00
{
public:
2017-05-23 18:01:50 +00:00
InterpreterAlterQuery(const ASTPtr & query_ptr_, const Context & context_);
2013-08-07 13:07:42 +00:00
BlockIO execute() override;
2013-08-07 13:07:42 +00:00
static AccessRightsElements getRequiredAccessForCommand(const ASTAlterCommand & command, const String & database, const String & table);
private:
2020-01-24 16:20:36 +00:00
AccessRightsElements getRequiredAccess() const;
ASTPtr query_ptr;
const Context & context;
2013-08-07 13:07:42 +00:00
};
2013-08-07 13:07:42 +00:00
}