dbms: doc: development [#METR-10719].

This commit is contained in:
Alexey Milovidov 2014-04-24 22:49:07 +04:00
parent 571a446aaf
commit 3b883d6b43
4 changed files with 9 additions and 16 deletions

View File

@ -7,8 +7,9 @@ namespace DB
{
/** Запрос типа такого:
* ALTER TABLE [db.]name
* [ADD COLUMN col_type [AFTER col_after],]
* [ADD COLUMN col_name type [AFTER col_after],]
* [DROP COLUMN col_drop, ...]
* [MODIFY COLUMN col_modify type, ...]
*/
class ParserAlterQuery : public IParserBase
{

View File

@ -85,6 +85,9 @@ protected:
*
* Или:
* CREATE|ATTACH DATABASE db
*
* Или:
* CREATE|ATTACH [MATERIALIZED] VIEW [IF NOT EXISTS] [db.]name [ENGINE = engine] [POPULATE] AS SELECT ...
*/
class ParserCreateQuery : public IParserBase
{

View File

@ -335,7 +335,9 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, const char
engine_p.parse(pos, end, storage, expected);
}
}
} else {
}
else
{
/// VIEW or MATERIALIZED VIEW
if (s_materialized.ignore(pos, end, expected) && ws.ignore(pos, end, expected))
is_materialized_view = true;
@ -366,19 +368,6 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, const char
ws.ignore(pos, end);
}
if (s_lparen.ignore(pos, end, expected))
{
ws.ignore(pos, end);
if (!columns_p.parse(pos, end, columns, expected))
return false;
ws.ignore(pos, end);
if (!s_rparen.ignore(pos, end, expected))
return false;
}
/// Опционально - может быть указана внутренняя ENGINE для MATERIALIZED VIEW
engine_p.parse(pos, end, inner_storage, expected);

View File

@ -515,7 +515,7 @@ void MergeTreeData::prepareAlterModify(const ASTAlterQuery::Parameters & params)
try
{
while(Block b = in.read())
while (Block b = in.read())
out.write(b);
in.readSuffix();