ClickHouse/dbms/include/DB/Parsers/ParserAlterQuery.h

31 lines
862 B
C++
Raw Normal View History

2013-08-07 13:07:42 +00:00
#pragma once
#include <DB/Parsers/IParserBase.h>
#include <DB/Parsers/ExpressionElementParsers.h>
namespace DB
{
2016-03-25 11:48:45 +00:00
2013-08-07 13:07:42 +00:00
/** Запрос типа такого:
* 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, ...]
* [MODIFY PRIMARY KEY (a, b, c...)]
* [DROP|DETACH|ATTACH [UNREPLICATED] PARTITION|PART partition, ...]
* [FETCH PARTITION partition FROM ...]
* [FREEZE PARTITION]
2016-03-25 11:48:45 +00:00
* [RESHARD [COPY] PARTITION partition
2016-03-01 17:47:53 +00:00
* TO '/path/to/zookeeper/table' [WEIGHT w], ...
* USING expression
* [COORDINATE WITH 'coordinator_id']]
2013-08-07 13:07:42 +00:00
*/
class ParserAlterQuery : public IParserBase
{
protected:
const char * getName() const { return "ALTER query"; }
bool parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_pos, Expected & expected);
2013-08-07 13:07:42 +00:00
};
}