<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<sql-cases>
    <sql-case id="grant_user_without_hostname" value="GRANT select, update, insert, delete on t_order to user_dev" db-types="Oracle,PostgreSQL,SQLServer" />
    <sql-case id="grant_user_with_grant" value="GRANT select, update, insert, delete on t_order to user_dev with GRANT option" db-types="Oracle,PostgreSQL,SQLServer"/>
    <sql-case id="grant_role" value="GRANT role_dev to user_dev" db-types="Oracle,PostgreSQL,SQLServer" />
    <sql-case id="grant_user_with_admin" value="GRANT ADVISOR, ALTER DATABASE to user_dev with admin option" db-types="Oracle" />
    <sql-case id="grant_user_on_db" value="GRANT ALL ON sharding_db.* TO 'user_dev'@'localhost'" db-types="MySQL" />
    <sql-case id="grant_user_on_table" value="GRANT ALL ON t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
    <sql-case id="grant_user_on_db_and_table" value="GRANT ALL ON sharding_db.t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
    <sql-case id="grant_user_with_hostname" value="GRANT select, update ON t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
    <sql-case id="grant_select" value="GRANT SELECT ON *.* TO user1" db-types="MySQL" />
    <sql-case id="grant_select_column" value="GRANT SELECT (order_id) ON ds_0.t_order TO user1" db-types="MySQL,SQLServer" />
    <sql-case id="grant_select_to_local_user" value="GRANT SELECT ON *.* TO 'user1'@'localhost'" db-types="MySQL" />
    <sql-case id="grant_crud" value="GRANT INSERT, SELECT, UPDATE, DELETE ON *.* TO user1" db-types="MySQL" />
    <sql-case id="grant_all" value="GRANT ALL PRIVILEGES ON *.* TO user1" db-types="MySQL" />
    <sql-case id="grant_all_on_table" value="GRANT ALL PRIVILEGES ON ds_0.t_order TO user1" db-types="MySQL,PostgreSQL,SQLServer" />
    <sql-case id="grant_role_to_user" value="GRANT role1 TO user1" db-types="MySQL" />
    <sql-case id="grant_roles_to_users" value="GRANT role1, role2 TO user1, user2" db-types="MySQL,Oracle" />
    <sql-case id="grant_system_privilege" value="GRANT CREATE SESSION TO user1" db-types="Oracle" />
    <sql-case id="grant_system_privileges" value="GRANT CREATE ANY MATERIALIZED VIEW, ALTER ANY MATERIALIZED VIEW, DROP ANY MATERIALIZED VIEW TO user1" db-types="Oracle" />
    <sql-case id="grant_all_system_privileges" value="GRANT ALL PRIVILEGES TO user1" db-types="Oracle" />
    <sql-case id="grant_system_privilege_to_users" value="GRANT CREATE SESSION TO user1, user2" db-types="Oracle" />
    <sql-case id="grant_object_privilege" value="GRANT SELECT ON ds_0.t_order TO user1" db-types="Oracle" />
    <sql-case id="grant_object_privileges" value="GRANT INSERT, SELECT, UPDATE, DELETE ON ds_0.t_order TO user1" db-types="Oracle,SQLServer" />
    <sql-case id="grant_all_object_privileges" value="GRANT ALL PRIVILEGES ON ds_0.t_order TO user1" db-types="Oracle" />
    <sql-case id="grant_object_privilege_to_users" value="GRANT SELECT ON ds_0.t_order TO user1, user2" db-types="Oracle" />
    <sql-case id="grant_object_privilege_column" value="GRANT SELECT (order_id) ON ds_0.t_order TO user1" db-types="Oracle" />
    <sql-case id="grant_program" value="GRANT role1 TO FUNCTION ds_0.function1" db-types="Oracle" />
    <sql-case id="grant_roles_to_programs" value="GRANT role1, role2 TO FUNCTION ds_0.function1, FUNCTION ds_0.function2" db-types="Oracle" />
    <sql-case id="grant_all_on_table_to_roles" value="GRANT ALL PRIVILEGES ON TABLE t_order TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_table_to_current_user" value="GRANT ALL PRIVILEGES ON TABLE t_order TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_tables" value="GRANT SELECT ON TABLE t_order, t_order_item TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_all_tables" value="GRANT SELECT ON ALL TABLES IN SCHEMA schema1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_column_on_table" value="GRANT ALL PRIVILEGES (order_id) ON TABLE t_order TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_column_on_table_to_roles" value="GRANT ALL PRIVILEGES (order_id) ON TABLE t_order TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_column_on_table_to_current_user" value="GRANT ALL PRIVILEGES (order_id) ON TABLE t_order TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_select_column_on_table" value="GRANT SELECT (order_id) ON TABLE t_order TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_column_on_tables" value="GRANT SELECT (order_id) ON TABLE t_order, t_order_item TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_sequence" value="GRANT ALL PRIVILEGES ON SEQUENCE seq_order_id TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_sequence_to_roles" value="GRANT ALL PRIVILEGES ON SEQUENCE seq_order_id TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_sequence_to_current_user" value="GRANT ALL PRIVILEGES ON SEQUENCE seq_order_id TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_sequence" value="GRANT SELECT ON SEQUENCE seq_order_id TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_sequences" value="GRANT SELECT ON SEQUENCE seq_order_id, seq_order_item_id TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_all_sequences" value="GRANT SELECT ON ALL SEQUENCES IN SCHEMA schema1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_database" value="GRANT ALL PRIVILEGES ON DATABASE database1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_database_to_roles" value="GRANT ALL PRIVILEGES ON DATABASE database1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_database_to_current_user" value="GRANT ALL PRIVILEGES ON DATABASE database1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_database" value="GRANT CREATE ON DATABASE database1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_databases" value="GRANT CREATE ON DATABASE database1, database2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_domain" value="GRANT ALL PRIVILEGES ON DOMAIN domain1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_domain_to_roles" value="GRANT ALL PRIVILEGES ON DOMAIN domain1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_domain_to_current_user" value="GRANT ALL PRIVILEGES ON DOMAIN domain1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_domain" value="GRANT USAGE ON DOMAIN domain1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_domains" value="GRANT USAGE ON DOMAIN domain1, domain2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_data_wrapper" value="GRANT ALL PRIVILEGES ON FOREIGN DATA WRAPPER fdw1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_data_wrapper_to_roles" value="GRANT ALL PRIVILEGES ON FOREIGN DATA WRAPPER fdw1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_data_wrapper_to_current_user" value="GRANT ALL PRIVILEGES ON FOREIGN DATA WRAPPER fdw1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_foreign_data_wrapper" value="GRANT USAGE ON FOREIGN DATA WRAPPER fdw1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_foreign_data_wrappers" value="GRANT USAGE ON FOREIGN DATA WRAPPER fdw1, fdw2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_server" value="GRANT ALL PRIVILEGES ON FOREIGN SERVER server1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_server_to_roles" value="GRANT ALL PRIVILEGES ON FOREIGN SERVER server1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_foreign_server_to_current_user" value="GRANT ALL PRIVILEGES ON FOREIGN SERVER server1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_foreign_server" value="GRANT USAGE ON FOREIGN SERVER server1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_foreign_servers" value="GRANT USAGE ON FOREIGN SERVER server1, server2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_function" value="GRANT ALL PRIVILEGES ON FUNCTION routine1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_function_to_roles" value="GRANT ALL PRIVILEGES ON FUNCTION routine1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_function_to_current_user" value="GRANT ALL PRIVILEGES ON FUNCTION routine1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_execute_on_function" value="GRANT EXECUTE ON FUNCTION routine1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_execute_on_functions" value="GRANT EXECUTE ON FUNCTION routine1, routine2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_execute_on_all_functions" value="GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA schema1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_language" value="GRANT ALL PRIVILEGES ON LANGUAGE lang1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_language_to_roles" value="GRANT ALL PRIVILEGES ON LANGUAGE lang1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_language_to_current_user" value="GRANT ALL PRIVILEGES ON LANGUAGE lang1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_language" value="GRANT USAGE ON LANGUAGE lang1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_languages" value="GRANT USAGE ON LANGUAGE lang1, lang2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_large_object" value="GRANT ALL PRIVILEGES ON LARGE OBJECT loid1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_large_object_to_roles" value="GRANT ALL PRIVILEGES ON LARGE OBJECT loid1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_large_object_to_current_user" value="GRANT ALL PRIVILEGES ON LARGE OBJECT loid1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_select_large_object" value="GRANT SELECT ON LARGE OBJECT loid1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_large_objects" value="GRANT SELECT ON LARGE OBJECT loid1, loid2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_schema" value="GRANT ALL PRIVILEGES ON SCHEMA schema1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_schema_to_roles" value="GRANT ALL PRIVILEGES ON SCHEMA schema1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_schema_to_current_user" value="GRANT ALL PRIVILEGES ON SCHEMA schema1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_schema" value="GRANT CREATE ON SCHEMA schema1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_schemas" value="GRANT CREATE ON SCHEMA schema1, schema2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_tablespace" value="GRANT ALL PRIVILEGES ON TABLESPACE tablespace1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_tablespace_to_roles" value="GRANT ALL PRIVILEGES ON TABLESPACE tablespace1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_tablespace_to_current_user" value="GRANT ALL PRIVILEGES ON TABLESPACE tablespace1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_tablespace" value="GRANT CREATE ON TABLESPACE tablespace1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_create_on_tablespaces" value="GRANT CREATE ON TABLESPACE tablespace1, tablespace2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_type" value="GRANT ALL PRIVILEGES ON TYPE type1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_type_to_roles" value="GRANT ALL PRIVILEGES ON TYPE type1 TO role1, role2" db-types="PostgreSQL" />
    <sql-case id="grant_all_on_type_to_current_user" value="GRANT ALL PRIVILEGES ON TYPE type1 TO CURRENT_USER" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_type" value="GRANT USAGE ON TYPE type1 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_usage_on_types" value="GRANT USAGE ON TYPE type1, type2 TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_roles" value="GRANT role1, role2 TO role3, role4" db-types="PostgreSQL" />
    <sql-case id="grant_select_to_users" value="GRANT SELECT (order_id) ON t_order TO user1, user2" db-types="SQLServer" />
    <sql-case id="grant_select_on_table_for_postgresql" value="GRANT SELECT ON TABLE t_order TO role1" db-types="PostgreSQL" />
    <sql-case id="grant_select_on_table_for_sqlserver" value="GRANT SELECT ON t_order TO user1" db-types="SQLServer" />
    <!-- FIXME same with grant_all_on_table_with_owner_for_mysql and grant_all_on_table_with_owner_for_postgresql, but parse results are different --> 
    <sql-case id="grant_all_on_table_with_owner_for_mysql" value="GRANT ALL PRIVILEGES ON ds_0.* TO user1" db-types="MySQL" />
    <sql-case id="grant_all_on_table_with_owner_for_postgresql" value="GRANT ALL PRIVILEGES ON ds_0.* TO user1" db-types="PostgreSQL" />
    <!-- FIXME end of fixme -->
</sql-cases>
