2017-04-01 09:19:00 +00:00
|
|
|
#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>
|
2020-03-18 14:11:44 +00:00
|
|
|
#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>
|
2020-02-04 22:37:04 +00:00
|
|
|
#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
|
|
|
|
{
|
|
|
|
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2011-10-30 11:30:52 +00:00
|
|
|
{
|
2020-11-02 12:47:12 +00:00
|
|
|
ParserQueryWithOutput query_with_output_p;
|
2017-07-10 03:41:02 +00:00
|
|
|
ParserInsertQuery insert_p(end);
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserUseQuery use_p;
|
|
|
|
ParserSetQuery set_p;
|
2017-08-04 15:54:00 +00:00
|
|
|
ParserSystemQuery system_p;
|
2020-02-04 22:37:04 +00:00
|
|
|
ParserCreateUserQuery create_user_p;
|
2020-02-17 02:59:56 +00:00
|
|
|
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;
|
2020-03-18 14:11:44 +00:00
|
|
|
ParserCreateSettingsProfileQuery create_settings_profile_p;
|
2019-12-01 22:01:05 +00:00
|
|
|
ParserDropAccessEntityQuery drop_access_entity_p;
|
2020-02-04 22:37:04 +00:00
|
|
|
ParserGrantQuery grant_p;
|
2020-02-17 02:59:56 +00:00
|
|
|
ParserSetRoleQuery set_role_p;
|
2020-07-06 13:57:45 +00:00
|
|
|
ParserExternalDDLQuery external_ddl_p;
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool res = query_with_output_p.parse(pos, node, expected)
|
|
|
|
|| insert_p.parse(pos, node, expected)
|
|
|
|
|| use_p.parse(pos, node, expected)
|
2020-02-17 02:59:56 +00:00
|
|
|
|| set_role_p.parse(pos, node, expected)
|
2017-07-10 03:28:12 +00:00
|
|
|
|| set_p.parse(pos, node, expected)
|
2019-12-01 22:01:05 +00:00
|
|
|
|| system_p.parse(pos, node, expected)
|
2020-02-04 22:37:04 +00:00
|
|
|
|| create_user_p.parse(pos, node, expected)
|
2020-02-17 02:59:56 +00:00
|
|
|
|| 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)
|
2020-03-18 14:11:44 +00:00
|
|
|
|| create_settings_profile_p.parse(pos, node, expected)
|
2020-02-04 22:37:04 +00:00
|
|
|
|| 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);
|
2017-04-01 07:20:54 +00:00
|
|
|
|
|
|
|
return res;
|
2011-10-30 11:30:52 +00:00
|
|
|
}
|
|
|
|
|
2012-07-12 19:49:22 +00:00
|
|
|
}
|