#include #include #include #include #include #include namespace DB { bool ParserUseQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected) { ParserKeyword s_use("USE"); ParserIdentifier name_p; ASTPtr database; if (!s_use.ignore(pos, expected)) return false; if (!name_p.parse(pos, database, expected)) return false; auto query = std::make_shared(); query->database = typeid_cast(*database).name; node = query; return true; } }