2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/ParserAlterQuery.h>
|
2021-05-09 09:47:29 +00:00
|
|
|
#include <Parsers/ParserCreateFunctionQuery.h>
|
2020-07-06 13:57:45 +00:00
|
|
|
#include <Parsers/ParserCreateQuery.h>
|
2022-06-16 09:58:14 +00:00
|
|
|
#include <Parsers/ParserCreateIndexQuery.h>
|
2021-05-14 22:43:04 +00:00
|
|
|
#include <Parsers/ParserDropFunctionQuery.h>
|
2022-06-17 07:46:44 +00:00
|
|
|
#include <Parsers/ParserDropIndexQuery.h>
|
2022-11-11 21:19:58 +00:00
|
|
|
#include <Parsers/ParserDropNamedCollectionQuery.h>
|
|
|
|
#include <Parsers/ParserAlterNamedCollectionQuery.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>
|
2022-06-07 05:20:46 +00:00
|
|
|
#include <Parsers/ParserDeleteQuery.h>
|
2011-10-30 11:30:52 +00:00
|
|
|
|
2021-10-31 08:51:20 +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>
|
2023-07-21 02:20:36 +00:00
|
|
|
#include <Parsers/Access/ParserMoveAccessEntityQuery.h>
|
2021-10-31 08:51:20 +00:00
|
|
|
#include <Parsers/Access/ParserSetRoleQuery.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
|
|
|
{
|
2022-04-04 08:09:22 +00:00
|
|
|
ParserQueryWithOutput query_with_output_p(end, allow_settings_after_format_in_insert);
|
|
|
|
ParserInsertQuery insert_p(end, allow_settings_after_format_in_insert);
|
2012-07-12 19:49:22 +00:00
|
|
|
ParserUseQuery use_p;
|
2012-08-02 19:03:32 +00:00
|
|
|
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;
|
2021-05-09 09:47:29 +00:00
|
|
|
ParserCreateFunctionQuery create_function_p;
|
2021-05-14 22:43:04 +00:00
|
|
|
ParserDropFunctionQuery drop_function_p;
|
2022-11-15 14:49:25 +00:00
|
|
|
ParserCreateNamedCollectionQuery create_named_collection_p;
|
2022-11-11 21:19:58 +00:00
|
|
|
ParserDropNamedCollectionQuery drop_named_collection_p;
|
|
|
|
ParserAlterNamedCollectionQuery alter_named_collection_p;
|
2022-06-16 09:58:14 +00:00
|
|
|
ParserCreateIndexQuery create_index_p;
|
2022-06-17 07:46:44 +00:00
|
|
|
ParserDropIndexQuery drop_index_p;
|
2019-12-01 22:01:05 +00:00
|
|
|
ParserDropAccessEntityQuery drop_access_entity_p;
|
2023-07-21 02:20:36 +00:00
|
|
|
ParserMoveAccessEntityQuery move_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;
|
2021-03-31 17:55:04 +00:00
|
|
|
ParserTransactionControl transaction_control_p;
|
2022-06-07 05:20:46 +00:00
|
|
|
ParserDeleteQuery delete_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)
|
2021-05-09 09:47:29 +00:00
|
|
|
|| create_function_p.parse(pos, node, expected)
|
2021-05-14 22:43:04 +00:00
|
|
|
|| drop_function_p.parse(pos, node, expected)
|
2022-11-15 14:49:25 +00:00
|
|
|
|| create_named_collection_p.parse(pos, node, expected)
|
2022-11-11 21:19:58 +00:00
|
|
|
|| drop_named_collection_p.parse(pos, node, expected)
|
|
|
|
|| alter_named_collection_p.parse(pos, node, expected)
|
2022-06-16 09:58:14 +00:00
|
|
|
|| create_index_p.parse(pos, node, expected)
|
2022-06-17 07:46:44 +00:00
|
|
|
|| drop_index_p.parse(pos, node, expected)
|
2020-02-04 22:37:04 +00:00
|
|
|
|| drop_access_entity_p.parse(pos, node, expected)
|
2023-07-21 02:20:36 +00:00
|
|
|
|| move_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)
|
2021-09-23 19:53:27 +00:00
|
|
|
|| transaction_control_p.parse(pos, node, expected)
|
2024-01-29 12:48:36 +00:00
|
|
|
|| delete_p.parse(pos, node, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2012-07-12 19:49:22 +00:00
|
|
|
return res;
|
2011-10-30 11:30:52 +00:00
|
|
|
}
|
|
|
|
|
2012-07-12 19:49:22 +00:00
|
|
|
}
|