mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
051dddd8df
Goes from rebuilding 483 objects to 165 when it's modified
31 lines
650 B
C++
31 lines
650 B
C++
#include <Parsers/ParserUseQuery.h>
|
|
#include <Parsers/ASTIdentifier_fwd.h>
|
|
#include <Parsers/ExpressionElementParsers.h>
|
|
#include <Parsers/CommonParsers.h>
|
|
#include <Parsers/ASTUseQuery.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
bool ParserUseQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
|
{
|
|
ParserKeyword s_use("USE");
|
|
ParserIdentifier name_p;
|
|
|
|
if (!s_use.ignore(pos, expected))
|
|
return false;
|
|
|
|
ASTPtr database;
|
|
if (!name_p.parse(pos, database, expected))
|
|
return false;
|
|
|
|
auto query = std::make_shared<ASTUseQuery>();
|
|
tryGetIdentifierNameInto(database, query->database);
|
|
node = query;
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|