2013-08-07 13:07:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Parsers/IParserBase.h>
|
|
|
|
#include <DB/Parsers/ExpressionElementParsers.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
/** Запрос типа такого:
|
|
|
|
* ALTER TABLE [db.]name
|
2014-04-24 18:49:07 +00:00
|
|
|
* [ADD COLUMN col_name type [AFTER col_after],]
|
2013-08-07 13:07:42 +00:00
|
|
|
* [DROP COLUMN col_drop, ...]
|
2014-04-24 18:49:07 +00:00
|
|
|
* [MODIFY COLUMN col_modify type, ...]
|
2014-10-09 20:28:33 +00:00
|
|
|
* [DROP|DETACH|ATTACH [UNREPLICATED] PARTITION|PART partition, ...]
|
2014-10-15 19:59:12 +00:00
|
|
|
* [FETCH PARTITION partition FROM ...]
|
2014-11-11 04:11:07 +00:00
|
|
|
* [FREEZE PARTITION]
|
2013-08-07 13:07:42 +00:00
|
|
|
*/
|
|
|
|
class ParserAlterQuery : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
2014-03-10 12:25:37 +00:00
|
|
|
const char * getName() const { return "ALTER query"; }
|
2014-06-12 00:48:56 +00:00
|
|
|
bool parseImpl(Pos & pos, Pos end, ASTPtr & node, Expected & expected);
|
2013-08-07 13:07:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|