ClickHouse/src/Parsers/ParserQuery.cpp

63 lines
2.2 KiB
C++
Raw Normal View History

#include <Parsers/ParserAlterQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserCreateQuery.h>
2019-12-01 22:01:05 +00:00
#include <Parsers/ParserCreateQuotaQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserCreateRoleQuery.h>
2019-11-29 17:22:56 +00:00
#include <Parsers/ParserCreateRowPolicyQuery.h>
#include <Parsers/ParserCreateSettingsProfileQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserCreateUserQuery.h>
2019-12-01 22:01:05 +00:00
#include <Parsers/ParserDropAccessEntityQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserDropQuery.h>
#include <Parsers/ParserGrantQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserInsertQuery.h>
#include <Parsers/ParserOptimizeQuery.h>
#include <Parsers/ParserQuery.h>
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/ParserRenameQuery.h>
#include <Parsers/ParserSetQuery.h>
#include <Parsers/ParserSetRoleQuery.h>
#include <Parsers/ParserSystemQuery.h>
#include <Parsers/ParserUseQuery.h>
#include <Parsers/ParserExternalDDLQuery.h>
2011-10-30 11:30:52 +00:00
namespace DB
{
bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
2011-10-30 11:30:52 +00:00
{
ParserQueryWithOutput query_with_output_p;
ParserInsertQuery insert_p(end);
ParserUseQuery use_p;
ParserSetQuery set_p;
ParserSystemQuery system_p;
ParserCreateUserQuery create_user_p;
ParserCreateRoleQuery create_role_p;
2019-12-01 22:01:05 +00:00
ParserCreateQuotaQuery create_quota_p;
2019-11-29 17:22:56 +00:00
ParserCreateRowPolicyQuery create_row_policy_p;
ParserCreateSettingsProfileQuery create_settings_profile_p;
2019-12-01 22:01:05 +00:00
ParserDropAccessEntityQuery drop_access_entity_p;
ParserGrantQuery grant_p;
ParserSetRoleQuery set_role_p;
2020-07-06 13:57:45 +00:00
ParserExternalDDLQuery external_ddl_p;
bool res = query_with_output_p.parse(pos, node, expected)
|| insert_p.parse(pos, node, expected)
|| use_p.parse(pos, node, expected)
|| set_role_p.parse(pos, node, expected)
|| set_p.parse(pos, node, expected)
2019-12-01 22:01:05 +00:00
|| system_p.parse(pos, node, expected)
|| create_user_p.parse(pos, node, expected)
|| create_role_p.parse(pos, node, expected)
2019-12-01 22:01:05 +00:00
|| create_quota_p.parse(pos, node, expected)
2019-11-29 17:22:56 +00:00
|| create_row_policy_p.parse(pos, node, expected)
|| create_settings_profile_p.parse(pos, node, expected)
|| drop_access_entity_p.parse(pos, node, expected)
2020-07-06 13:57:45 +00:00
|| grant_p.parse(pos, node, expected)
|| external_ddl_p.parse(pos, node, expected);
return res;
2011-10-30 11:30:52 +00:00
}
2012-07-12 19:49:22 +00:00
}