ClickHouse/src/Parsers/ParserQuery.cpp

76 lines
2.9 KiB
C++
Raw Normal View History

#include <Parsers/ParserAlterQuery.h>
#include <Parsers/ParserCreateFunctionQuery.h>
2021-08-18 22:19:14 +00:00
#include <Parsers/ParserBackupQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserCreateQuery.h>
2021-05-14 22:43:04 +00:00
#include <Parsers/ParserDropFunctionQuery.h>
2020-07-06 13:57:45 +00:00
#include <Parsers/ParserDropQuery.h>
#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/ParserSystemQuery.h>
#include <Parsers/ParserUseQuery.h>
#include <Parsers/ParserExternalDDLQuery.h>
2021-03-31 17:55:04 +00:00
#include <Parsers/ParserTransactionControl.h>
2011-10-30 11:30:52 +00:00
#include <Parsers/Access/ParserCreateQuotaQuery.h>
#include <Parsers/Access/ParserCreateRoleQuery.h>
#include <Parsers/Access/ParserCreateRowPolicyQuery.h>
#include <Parsers/Access/ParserCreateSettingsProfileQuery.h>
#include <Parsers/Access/ParserCreateUserQuery.h>
#include <Parsers/Access/ParserDropAccessEntityQuery.h>
#include <Parsers/Access/ParserGrantQuery.h>
#include <Parsers/Access/ParserSetRoleQuery.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(end, allow_settings_after_format_in_insert);
ParserInsertQuery insert_p(end, allow_settings_after_format_in_insert);
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;
ParserCreateFunctionQuery create_function_p;
2021-05-14 22:43:04 +00:00
ParserDropFunctionQuery drop_function_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;
2021-03-31 17:55:04 +00:00
ParserTransactionControl transaction_control_p;
2021-08-18 22:19:14 +00:00
ParserBackupQuery backup_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)
|| create_function_p.parse(pos, node, expected)
2021-05-14 22:43:04 +00:00
|| drop_function_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)
2021-03-31 17:55:04 +00:00
|| external_ddl_p.parse(pos, node, expected)
|| transaction_control_p.parse(pos, node, expected)
2021-08-18 22:19:14 +00:00
|| backup_p.parse(pos, node, expected);
return res;
2011-10-30 11:30:52 +00:00
}
2012-07-12 19:49:22 +00:00
}