Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
0f908c32
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0f908c32
编写于
2月 04, 2020
作者:
L
Liang Zhang
提交者:
GitHub
2月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Split DCL statement to concrete SQL statement (#4158)
上级
a42438ac
变更
70
隐藏空白更改
内联
并排
Showing
70 changed file
with
1544 addition
and
272 deletion
+1544
-272
sharding-integration-test/sharding-jdbc-test/src/test/resources/integrate/cases/dcl/dcl-integrate-test-cases.xml
...esources/integrate/cases/dcl/dcl-integrate-test-cases.xml
+0
-3
sharding-sql-test/src/main/resources/sql/supported/dcl/alter_login.xml
...test/src/main/resources/sql/supported/dcl/alter_login.xml
+0
-1
sharding-sql-test/src/main/resources/sql/supported/dcl/drop_user.xml
...l-test/src/main/resources/sql/supported/dcl/drop_user.xml
+0
-2
sharding-sql-test/src/main/resources/sql/supported/dcl/set_role.xml
...ql-test/src/main/resources/sql/supported/dcl/set_role.xml
+5
-1
sharding-sql-test/src/main/resources/sql/visitor/dcl/set-default-role.xml
...t/src/main/resources/sql/visitor/dcl/set-default-role.xml
+0
-24
sharding-sql-test/src/main/resources/sql/visitor/dcl/set-role.xml
...-sql-test/src/main/resources/sql/visitor/dcl/set-role.xml
+4
-4
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterLoginStatement.java
...ere/sql/parser/sql/statement/dcl/AlterLoginStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterRoleStatement.java
...here/sql/parser/sql/statement/dcl/AlterRoleStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterUserStatement.java
...here/sql/parser/sql/statement/dcl/AlterUserStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/CreateLoginStatement.java
...re/sql/parser/sql/statement/dcl/CreateLoginStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/CreateRoleStatement.java
...ere/sql/parser/sql/statement/dcl/CreateRoleStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DenyUserStatement.java
...phere/sql/parser/sql/statement/dcl/DenyUserStatement.java
+35
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropLoginStatement.java
...here/sql/parser/sql/statement/dcl/DropLoginStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropRoleStatement.java
...phere/sql/parser/sql/statement/dcl/DropRoleStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropUserStatement.java
...phere/sql/parser/sql/statement/dcl/DropUserStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/RenameUserStatement.java
...ere/sql/parser/sql/statement/dcl/RenameUserStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/SetPasswordStatement.java
...re/sql/parser/sql/statement/dcl/SetPasswordStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/SetRoleStatement.java
...sphere/sql/parser/sql/statement/dcl/SetRoleStatement.java
+26
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/MySQLVisitor.java
...va/org/apache/shardingsphere/sql/parser/MySQLVisitor.java
+16
-10
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/resources/META-INF/parsing-rule-definition/mysql/sql-statement-rule-definition.xml
...g-rule-definition/mysql/sql-statement-rule-definition.xml
+8
-8
shardingsphere-sql-parser/shardingsphere-sql-parser-oracle/src/main/resources/META-INF/parsing-rule-definition/oracle/sql-statement-rule-definition.xml
...-rule-definition/oracle/sql-statement-rule-definition.xml
+5
-5
shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/resources/META-INF/parsing-rule-definition/postgresql/sql-statement-rule-definition.xml
...e-definition/postgresql/sql-statement-rule-definition.xml
+5
-5
shardingsphere-sql-parser/shardingsphere-sql-parser-sqlserver/src/main/resources/META-INF/parsing-rule-definition/sqlserver/sql-statement-rule-definition.xml
...le-definition/sqlserver/sql-statement-rule-definition.xml
+9
-9
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/DCLStatementAssert.java
...r/integrate/asserts/statement/dcl/DCLStatementAssert.java
+60
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterLoginStatementAssert.java
...asserts/statement/dcl/impl/AlterLoginStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterRoleStatementAssert.java
.../asserts/statement/dcl/impl/AlterRoleStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterUserStatementAssert.java
.../asserts/statement/dcl/impl/AlterUserStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/CreateLoginStatementAssert.java
...sserts/statement/dcl/impl/CreateLoginStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/CreateRoleStatementAssert.java
...asserts/statement/dcl/impl/CreateRoleStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DenyUserStatementAssert.java
...e/asserts/statement/dcl/impl/DenyUserStatementAssert.java
+57
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropLoginStatementAssert.java
.../asserts/statement/dcl/impl/DropLoginStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropRoleStatementAssert.java
...e/asserts/statement/dcl/impl/DropRoleStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropUserStatementAssert.java
...e/asserts/statement/dcl/impl/DropUserStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/RenameUserStatementAssert.java
...asserts/statement/dcl/impl/RenameUserStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/SetPasswordStatementAssert.java
...sserts/statement/dcl/impl/SetPasswordStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/SetRoleStatementAssert.java
...te/asserts/statement/dcl/impl/SetRoleStatementAssert.java
+43
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/SQLParserTestCases.java
...gsphere/sql/parser/integrate/jaxb/SQLParserTestCases.java
+60
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterLoginStatementTestCase.java
...grate/jaxb/statement/dcl/AlterLoginStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterRoleStatementTestCase.java
...egrate/jaxb/statement/dcl/AlterRoleStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterUserStatementTestCase.java
...egrate/jaxb/statement/dcl/AlterUserStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/CreateLoginStatementTestCase.java
...rate/jaxb/statement/dcl/CreateLoginStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/CreateRoleStatementTestCase.java
...grate/jaxb/statement/dcl/CreateRoleStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DenyUserStatementTestCase.java
...tegrate/jaxb/statement/dcl/DenyUserStatementTestCase.java
+38
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropLoginStatementTestCase.java
...egrate/jaxb/statement/dcl/DropLoginStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropRoleStatementTestCase.java
...tegrate/jaxb/statement/dcl/DropRoleStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropUserStatementTestCase.java
...tegrate/jaxb/statement/dcl/DropUserStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/RenameUserStatementTestCase.java
...grate/jaxb/statement/dcl/RenameUserStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/SetPasswordStatementTestCase.java
...rate/jaxb/statement/dcl/SetPasswordStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/SetRoleStatementTestCase.java
...ntegrate/jaxb/statement/dcl/SetRoleStatementTestCase.java
+28
-0
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-login.xml
...ql-parser-test/src/test/resources/sql/dcl/alter-login.xml
+11
-10
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-role.xml
...sql-parser-test/src/test/resources/sql/dcl/alter-role.xml
+21
-21
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-user.xml
...sql-parser-test/src/test/resources/sql/dcl/alter-user.xml
+46
-50
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-login.xml
...l-parser-test/src/test/resources/sql/dcl/create-login.xml
+8
-7
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-role.xml
...ql-parser-test/src/test/resources/sql/dcl/create-role.xml
+15
-13
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-user.xml
...ql-parser-test/src/test/resources/sql/dcl/create-user.xml
+0
-4
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/deny-user.xml
...-sql-parser-test/src/test/resources/sql/dcl/deny-user.xml
+12
-12
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-login.xml
...sql-parser-test/src/test/resources/sql/dcl/drop-login.xml
+1
-1
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-role.xml
...-sql-parser-test/src/test/resources/sql/dcl/drop-role.xml
+3
-3
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-user.xml
...-sql-parser-test/src/test/resources/sql/dcl/drop-user.xml
+6
-8
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/rename-user.xml
...ql-parser-test/src/test/resources/sql/dcl/rename-user.xml
+2
-2
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/set-password.xml
...l-parser-test/src/test/resources/sql/dcl/set-password.xml
+5
-5
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/set-role.xml
...e-sql-parser-test/src/test/resources/sql/dcl/set-role.xml
+11
-7
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/alter-user.xml
...parser-test/src/test/resources/visitor/dcl/alter-user.xml
+12
-12
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/create-role.xml
...arser-test/src/test/resources/visitor/dcl/create-role.xml
+3
-3
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/drop-role.xml
...-parser-test/src/test/resources/visitor/dcl/drop-role.xml
+3
-3
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/drop-user.xml
...-parser-test/src/test/resources/visitor/dcl/drop-user.xml
+4
-4
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/rename-user.xml
...arser-test/src/test/resources/visitor/dcl/rename-user.xml
+2
-2
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/set-default-role.xml
...-test/src/test/resources/visitor/dcl/set-default-role.xml
+0
-24
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/set-password.xml
...rser-test/src/test/resources/visitor/dcl/set-password.xml
+5
-5
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/set-role.xml
...l-parser-test/src/test/resources/visitor/dcl/set-role.xml
+5
-4
未找到文件。
sharding-integration-test/sharding-jdbc-test/src/test/resources/integrate/cases/dcl/dcl-integrate-test-cases.xml
浏览文件 @
0f908c32
...
...
@@ -257,9 +257,6 @@
<dcl-test-case
sql-case-id=
"create_global_user"
>
<assertion
/>
</dcl-test-case>
<dcl-test-case
sql-case-id=
"create_login_set_expired_password"
>
<assertion
/>
</dcl-test-case>
<dcl-test-case
sql-case-id=
"create_login_to_credential"
>
<assertion
/>
</dcl-test-case>
...
...
sharding-sql-test/src/main/resources/sql/supported/dcl/alter_login.xml
浏览文件 @
0f908c32
...
...
@@ -22,7 +22,6 @@
<sql-case
id=
"alter_login_set_hashed_password"
value=
"ALTER LOGIN login1 WITH PASSWORD = 0x01000CF35567C60BFB41EBDE4CF700A985A13D773D6B45B90900 HASHED"
db-types=
"SQLServer"
/>
<sql-case
id=
"alter_login_set_password_with_old_password"
value=
"ALTER LOGIN login1 WITH PASSWORD = 'password' OLD_PASSWORD = 'password'"
db-types=
"SQLServer"
/>
<sql-case
id=
"alter_login_set_default_database"
value=
"ALTER LOGIN login1 WITH DEFAULT_DATABASE = database"
db-types=
"SQLServer"
/>
<sql-case
id=
"create_login_set_expired_password"
value=
"CREATE LOGIN login1 WITH PASSWORD = 'password' MUST_CHANGE, CHECK_EXPIRATION = ON"
db-types=
"SQLServer"
/>
<sql-case
id=
"alter_login_add_credential"
value=
"ALTER LOGIN login1 ADD CREDENTIAL credential"
db-types=
"SQLServer"
/>
<sql-case
id=
"alter_login_drop_credential"
value=
"ALTER LOGIN login1 DROP CREDENTIAL credential"
db-types=
"SQLServer"
/>
<sql-case
id=
"alter_login_unlock"
value=
"ALTER LOGIN login1 WITH PASSWORD = 'password' UNLOCK"
db-types=
"SQLServer"
/>
...
...
sharding-sql-test/src/main/resources/sql/supported/dcl/drop_user.xml
浏览文件 @
0f908c32
...
...
@@ -20,8 +20,6 @@
<sql-case
id=
"drop_user_without_hostname"
value=
"DROP USER user_dev"
db-types=
"Oracle,PostgreSQL,SQLServer"
/>
<sql-case
id=
"drop_user_with_hostname"
value=
"DROP USER user_dev@localhost"
db-types=
"MySQL,Oracle"
/>
<sql-case
id=
"drop_user_cascade"
value=
"DROP USER user_dev CASCADE"
db-types=
"Oracle"
/>
<sql-case
id=
"drop_role"
value=
"DROP ROLE role_dev"
db-types=
"Oracle,PostgreSQL,SQLServer"
/>
<sql-case
id=
"drop_login"
value=
"DROP LOGIN login_dev"
db-types=
"SQLServer"
/>
<sql-case
id=
"drop_user"
value=
"DROP USER user1"
db-types=
"MySQL,Oracle,PostgreSQL,SQLServer"
/>
<sql-case
id=
"drop_users"
value=
"DROP USER user1, user2"
db-types=
"MySQL,PostgreSQL"
/>
<sql-case
id=
"drop_user_if_exists"
value=
"DROP USER IF EXISTS user1"
db-types=
"MySQL,PostgreSQL,SQLServer"
/>
...
...
sharding-sql-test/src/main/resources/sql/supported/dcl/set_role.xml
浏览文件 @
0f908c32
...
...
@@ -20,8 +20,12 @@
<sql-case
id=
"set_role"
value=
"SET ROLE role1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_roles"
value=
"SET ROLE role1, role2"
db-types=
"MySQL"
/>
<sql-case
id=
"set_none_role"
value=
"SET ROLE NONE"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_role"
value=
"SET ROLE DEFAULT"
db-types=
"MySQL"
/>
<sql-case
id=
"set_all_role"
value=
"SET ROLE ALL"
db-types=
"MySQL"
/>
<sql-case
id=
"set_all_expect_role"
value=
"SET ROLE ALL EXCEPT role1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_all_expect_roles"
value=
"SET ROLE ALL EXCEPT role1, role2"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_none_role"
value=
"SET DEFAULT ROLE NONE TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_all_role"
value=
"SET DEFAULT ROLE ALL TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_role"
value=
"SET ROLE DEFAULT"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_role_to_user"
value=
"SET DEFAULT ROLE role1 TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_default_roles_to_users"
value=
"SET DEFAULT ROLE role1, role2 TO user1, user2"
db-types=
"MySQL"
/>
</sql-cases>
sharding-sql-test/src/main/resources/sql/visitor/dcl/set-default-role.xml
已删除
100644 → 0
浏览文件 @
a42438ac
<?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=
"set_none_role"
value=
"SET DEFAULT ROLE NONE TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_all_role"
value=
"SET DEFAULT ROLE ALL TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_role"
value=
"SET DEFAULT ROLE role1 TO user1"
db-types=
"MySQL"
/>
<sql-case
id=
"set_roles_to_users"
value=
"SET DEFAULT ROLE role1, role2 TO user1, user2"
db-types=
"MySQL"
/>
</sql-cases>
sharding-sql-test/src/main/resources/sql/
supported/dcl/set_default_
role.xml
→
sharding-sql-test/src/main/resources/sql/
visitor/dcl/set-
role.xml
浏览文件 @
0f908c32
...
...
@@ -17,8 +17,8 @@
-->
<sql-cases>
<
sql-case
id=
"set_none_role"
value=
"SET DEFAULT ROLE NONE TO user1"
db-types=
"MySQL"
/
>
<
sql-case
id=
"set_all_role"
value=
"SET DEFAULT ROLE ALL TO user1"
db-types=
"MySQL"
/
>
<
sql-case
id=
"set_role"
value=
"SET DEFAULT ROLE role1 TO user1"
db-types=
"MySQL"
/
>
<
sql-case
id=
"set_roles_to_users"
value=
"SET DEFAULT ROLE role1, role2 TO user1, user2"
db-types=
"MySQL"
/
>
<
!--<sql-case id="set_default_none_role" value="SET DEFAULT ROLE NONE TO user1" db-types="MySQL" />--
>
<
!--<sql-case id="set_default_all_role" value="SET DEFAULT ROLE ALL TO user1" db-types="MySQL" />--
>
<
!--<sql-case id="set_default_role_to_user" value="SET DEFAULT ROLE role1 TO user1" db-types="MySQL" />--
>
<
!--<sql-case id="set_default_roles_to_users" value="SET DEFAULT ROLE role1, role2 TO user1, user2" db-types="MySQL" />--
>
</sql-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterLoginStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Alter login statement.
*
* @author zhangliang
*/
public
final
class
AlterLoginStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterRoleStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Alter role statement.
*
* @author zhangliang
*/
public
final
class
AlterRoleStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/AlterUserStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Alter user statement.
*
* @author zhangliang
*/
public
final
class
AlterUserStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/CreateLoginStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Create login statement.
*
* @author zhangliang
*/
public
final
class
CreateLoginStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/CreateRoleStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Create role statement.
*
* @author zhangliang
*/
public
final
class
CreateRoleStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DenyUserStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.sql.parser.sql.segment.generic.TableSegment
;
import
org.apache.shardingsphere.sql.parser.sql.statement.generic.TableSegmentAvailable
;
/**
* Deny user statement.
*
* @author zhangliang
*/
@Getter
@Setter
public
final
class
DenyUserStatement
extends
DCLStatement
implements
TableSegmentAvailable
{
private
TableSegment
table
;
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropLoginStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Drop login statement.
*
* @author zhangliang
*/
public
final
class
DropLoginStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropRoleStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Drop role statement.
*
* @author zhangliang
*/
public
final
class
DropRoleStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/DropUserStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Drop user statement.
*
* @author zhangliang
*/
public
final
class
DropUserStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/RenameUserStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Rename user statement.
*
* @author zhangliang
*/
public
final
class
RenameUserStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/SetPasswordStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Set password statement.
*
* @author zhangliang
*/
public
final
class
SetPasswordStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dcl/SetRoleStatement.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.sql.statement.dcl
;
/**
* Set role statement.
*
* @author zhangliang
*/
public
final
class
SetRoleStatement
extends
DCLStatement
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/MySQLVisitor.java
浏览文件 @
0f908c32
...
...
@@ -26,8 +26,6 @@ import org.antlr.v4.runtime.ParserRuleContext;
import
org.antlr.v4.runtime.tree.TerminalNode
;
import
org.apache.shardingsphere.sql.parser.api.SQLVisitor
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementBaseVisitor
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropRoleContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetDefaultRoleContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.AddColumnSpecificationContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.AddConstraintSpecificationContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.AggregationFunctionContext
;
...
...
@@ -64,6 +62,7 @@ import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DataTyp
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DeleteContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropColumnSpecificationContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropIndexContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropRoleContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropTableContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DropUserContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DuplicateSpecificationContext
;
...
...
@@ -110,6 +109,7 @@ import org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SelectC
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SelectSpecificationContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetAssignmentsClauseContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetAutoCommitContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetDefaultRoleContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetPasswordContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.SetTransactionContext
;
import
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ShowLikeContext
;
...
...
@@ -177,8 +177,14 @@ import org.apache.shardingsphere.sql.parser.sql.segment.generic.TableSegment;
import
org.apache.shardingsphere.sql.parser.sql.segment.tcl.AutoCommitSegment
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.ShowTableStatusStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.UseStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.RenameUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetPasswordStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.ddl.AlterTableStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.ddl.CreateIndexStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.ddl.CreateTableStatement
;
...
...
@@ -261,37 +267,37 @@ public final class MySQLVisitor extends MySQLStatementBaseVisitor<ASTNode> imple
@Override
public
ASTNode
visitDropRole
(
final
DropRoleContext
ctx
)
{
return
new
D
CL
Statement
();
return
new
D
ropRole
Statement
();
}
@Override
public
ASTNode
visitSetDefaultRole
(
final
SetDefaultRoleContext
ctx
)
{
return
new
DCL
Statement
();
return
new
SetRole
Statement
();
}
@Override
public
ASTNode
visitCreateRole
(
final
CreateRoleContext
ctx
)
{
return
new
DCL
Statement
();
return
new
CreateRole
Statement
();
}
@Override
public
ASTNode
visitDropUser
(
final
DropUserContext
ctx
)
{
return
new
D
CL
Statement
();
return
new
D
ropUser
Statement
();
}
@Override
public
ASTNode
visitAlterUser
(
final
AlterUserContext
ctx
)
{
return
new
DCL
Statement
();
return
new
AlterUser
Statement
();
}
@Override
public
ASTNode
visitRenameUser
(
final
RenameUserContext
ctx
)
{
return
new
DCL
Statement
();
return
new
RenameUser
Statement
();
}
@Override
public
ASTNode
visitSetPassword
(
final
SetPasswordContext
ctx
)
{
return
new
DCL
Statement
();
return
new
SetPassword
Statement
();
}
// DDLStatement.g4
...
...
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/resources/META-INF/parsing-rule-definition/mysql/sql-statement-rule-definition.xml
浏览文件 @
0f908c32
...
...
@@ -40,14 +40,14 @@
<sql-statement-rule
context=
"grant"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.GrantStatement"
extractor-rule-refs=
"tables"
/>
<sql-statement-rule
context=
"revoke"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.RevokeStatement"
extractor-rule-refs=
"tables"
/>
<sql-statement-rule
context=
"createUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"renameUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"setDefaultRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"setRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"setPassword"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
AlterUser
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropUser
Statement"
/>
<sql-statement-rule
context=
"renameUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
RenameUser
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
CreateRole
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropRole
Statement"
/>
<sql-statement-rule
context=
"setDefaultRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
SetRole
Statement"
/>
<sql-statement-rule
context=
"setRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
SetRole
Statement"
/>
<sql-statement-rule
context=
"setPassword"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
SetPassword
Statement"
/>
<sql-statement-rule
context=
"use"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.UseStatement"
extractor-rule-refs=
"schema"
/>
<sql-statement-rule
context=
"desc"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.DescribeStatement"
extractor-rule-refs=
"table"
/>
...
...
shardingsphere-sql-parser/shardingsphere-sql-parser-oracle/src/main/resources/META-INF/parsing-rule-definition/oracle/sql-statement-rule-definition.xml
浏览文件 @
0f908c32
...
...
@@ -38,9 +38,9 @@
<sql-statement-rule
context=
"grant"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.GrantStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"revoke"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.RevokeStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"createUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
AlterUser
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropUser
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
CreateRole
Statement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
AlterRole
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropRole
Statement"
/>
</sql-statement-rule-definition>
shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/resources/META-INF/parsing-rule-definition/postgresql/sql-statement-rule-definition.xml
浏览文件 @
0f908c32
...
...
@@ -43,9 +43,9 @@
<sql-statement-rule
context=
"grant"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.GrantStatement"
extractor-rule-refs=
"tables"
/>
<sql-statement-rule
context=
"revoke"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.RevokeStatement"
extractor-rule-refs=
"tables"
/>
<sql-statement-rule
context=
"createUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
DCL
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
CL
Statement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
AlterUser
Statement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropUser
Statement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
CreateRole
Statement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.
AlterRole
Statement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.D
ropRole
Statement"
/>
</sql-statement-rule-definition>
shardingsphere-sql-parser/shardingsphere-sql-parser-sqlserver/src/main/resources/META-INF/parsing-rule-definition/sqlserver/sql-statement-rule-definition.xml
浏览文件 @
0f908c32
...
...
@@ -39,14 +39,14 @@
<sql-statement-rule
context=
"grant"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.GrantStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"revoke"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.RevokeStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"deny"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"createUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"createLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"alterLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"dropLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement"
/>
<sql-statement-rule
context=
"alterUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterUserStatement"
/>
<sql-statement-rule
context=
"dropUser"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropUserStatement"
/>
<sql-statement-rule
context=
"deny"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DenyUserStatement"
extractor-rule-refs=
"table"
/>
<sql-statement-rule
context=
"createLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateLoginStatement"
/>
<sql-statement-rule
context=
"alterLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterLoginStatement"
/>
<sql-statement-rule
context=
"dropLogin"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropLoginStatement"
/>
<sql-statement-rule
context=
"createRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateRoleStatement"
/>
<sql-statement-rule
context=
"alterRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterRoleStatement"
/>
<sql-statement-rule
context=
"dropRole"
sql-statement-class=
"org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropRoleStatement"
/>
</sql-statement-rule-definition>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/DCLStatementAssert.java
浏览文件 @
0f908c32
...
...
@@ -20,17 +20,53 @@ package org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.AlterLoginStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.AlterRoleStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.AlterUserStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.CreateLoginStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.CreateRoleStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.CreateUserStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.DenyUserStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.DropLoginStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.DropRoleStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.DropUserStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.GrantStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.RenameUserStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.RevokeStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.SetPasswordStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl.SetRoleStatementAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DenyUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.GrantStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.RenameUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.RevokeStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetPasswordStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterLoginStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateLoginStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DCLStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DenyUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropLoginStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropRoleStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.GrantStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.RenameUserStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.RevokeStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetPasswordStatement
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetRoleStatement
;
/**
* DCL statement assert.
...
...
@@ -54,6 +90,30 @@ public final class DCLStatementAssert {
RevokeStatementAssert
.
assertIs
(
assertContext
,
(
RevokeStatement
)
actual
,
(
RevokeStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
CreateUserStatement
)
{
CreateUserStatementAssert
.
assertIs
(
assertContext
,
(
CreateUserStatement
)
actual
,
(
CreateUserStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
AlterUserStatement
)
{
AlterUserStatementAssert
.
assertIs
(
assertContext
,
(
AlterUserStatement
)
actual
,
(
AlterUserStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
DropUserStatement
)
{
DropUserStatementAssert
.
assertIs
(
assertContext
,
(
DropUserStatement
)
actual
,
(
DropUserStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
RenameUserStatement
)
{
RenameUserStatementAssert
.
assertIs
(
assertContext
,
(
RenameUserStatement
)
actual
,
(
RenameUserStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
DenyUserStatement
)
{
DenyUserStatementAssert
.
assertIs
(
assertContext
,
(
DenyUserStatement
)
actual
,
(
DenyUserStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
CreateLoginStatement
)
{
CreateLoginStatementAssert
.
assertIs
(
assertContext
,
(
CreateLoginStatement
)
actual
,
(
CreateLoginStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
AlterLoginStatement
)
{
AlterLoginStatementAssert
.
assertIs
(
assertContext
,
(
AlterLoginStatement
)
actual
,
(
AlterLoginStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
DropLoginStatement
)
{
DropLoginStatementAssert
.
assertIs
(
assertContext
,
(
DropLoginStatement
)
actual
,
(
DropLoginStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
CreateRoleStatement
)
{
CreateRoleStatementAssert
.
assertIs
(
assertContext
,
(
CreateRoleStatement
)
actual
,
(
CreateRoleStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
AlterRoleStatement
)
{
AlterRoleStatementAssert
.
assertIs
(
assertContext
,
(
AlterRoleStatement
)
actual
,
(
AlterRoleStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
DropRoleStatement
)
{
DropRoleStatementAssert
.
assertIs
(
assertContext
,
(
DropRoleStatement
)
actual
,
(
DropRoleStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
SetRoleStatement
)
{
SetRoleStatementAssert
.
assertIs
(
assertContext
,
(
SetRoleStatement
)
actual
,
(
SetRoleStatementTestCase
)
expected
);
}
else
if
(
actual
instanceof
SetPasswordStatement
)
{
SetPasswordStatementAssert
.
assertIs
(
assertContext
,
(
SetPasswordStatement
)
actual
,
(
SetPasswordStatementTestCase
)
expected
);
}
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterLoginStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterLoginStatement
;
/**
* Alter login statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
AlterLoginStatementAssert
{
/**
* Assert alter login statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual alter login statement
* @param expected expected alter login statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
AlterLoginStatement
actual
,
final
AlterLoginStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterRoleStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterRoleStatement
;
/**
* Alter role statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
AlterRoleStatementAssert
{
/**
* Assert alter role statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual alter role statement
* @param expected expected alter role statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
AlterRoleStatement
actual
,
final
AlterRoleStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/AlterUserStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.AlterUserStatement
;
/**
* Alter user statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
AlterUserStatementAssert
{
/**
* Assert alter user statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual alter user statement
* @param expected expected alter user statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
AlterUserStatement
actual
,
final
AlterUserStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/CreateLoginStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateLoginStatement
;
/**
* Create login statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
CreateLoginStatementAssert
{
/**
* Assert create login statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual create login statement
* @param expected expected create login statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
CreateLoginStatement
actual
,
final
CreateLoginStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/CreateRoleStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.CreateRoleStatement
;
/**
* Create role statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
CreateRoleStatementAssert
{
/**
* Assert create role statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual create role statement
* @param expected expected create role statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
CreateRoleStatement
actual
,
final
CreateRoleStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DenyUserStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.TableAssert
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DenyUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DenyUserStatement
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNull
;
/**
* Deny user statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
DenyUserStatementAssert
{
/**
* Assert deny user statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual deny user statement
* @param expected expected deny user statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
DenyUserStatement
actual
,
final
DenyUserStatementTestCase
expected
)
{
assertTable
(
assertContext
,
actual
,
expected
);
}
private
static
void
assertTable
(
final
SQLCaseAssertContext
assertContext
,
final
DenyUserStatement
actual
,
final
DenyUserStatementTestCase
expected
)
{
if
(
null
!=
expected
.
getTable
())
{
assertNotNull
(
assertContext
.
getText
(
"Actual table segment should exist."
),
actual
.
getTable
());
TableAssert
.
assertIs
(
assertContext
,
actual
.
getTable
(),
expected
.
getTable
());
}
else
{
assertNull
(
assertContext
.
getText
(
"Actual table segment should not exist."
),
actual
.
getTable
());
}
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropLoginStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropLoginStatement
;
/**
* Drop login statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
DropLoginStatementAssert
{
/**
* Assert drop login statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual drop login statement
* @param expected expected drop login statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
DropLoginStatement
actual
,
final
DropLoginStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropRoleStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropRoleStatement
;
/**
* Drop role statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
DropRoleStatementAssert
{
/**
* Assert drop role statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual drop role statement
* @param expected expected drop role statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
DropRoleStatement
actual
,
final
DropRoleStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/DropUserStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.DropUserStatement
;
/**
* Drop user statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
DropUserStatementAssert
{
/**
* Assert drop user statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual drop user statement
* @param expected expected drop user statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
DropUserStatement
actual
,
final
DropUserStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/RenameUserStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.RenameUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.RenameUserStatement
;
/**
* Rename user statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
RenameUserStatementAssert
{
/**
* Assert rename user statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual rename user statement
* @param expected expected rename user statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
RenameUserStatement
actual
,
final
RenameUserStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/SetPasswordStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetPasswordStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetPasswordStatement
;
/**
* Set password statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
SetPasswordStatementAssert
{
/**
* Assert set password statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual set password statement
* @param expected expected set password statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
SetPasswordStatement
actual
,
final
SetPasswordStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dcl/impl/SetRoleStatementAssert.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.asserts.statement.dcl.impl
;
import
lombok.AccessLevel
;
import
lombok.NoArgsConstructor
;
import
org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.sql.statement.dcl.SetRoleStatement
;
/**
* Set role statement assert.
*
* @author zhangliang
*/
@NoArgsConstructor
(
access
=
AccessLevel
.
PRIVATE
)
public
final
class
SetRoleStatementAssert
{
/**
* Assert set role statement is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual set role statement
* @param expected expected set role statement test case
*/
public
static
void
assertIs
(
final
SQLCaseAssertContext
assertContext
,
final
SetRoleStatement
actual
,
final
SetRoleStatementTestCase
expected
)
{
}
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/SQLParserTestCases.java
浏览文件 @
0f908c32
...
...
@@ -28,9 +28,21 @@ import org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dal.ShowSta
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dal.ShowTableStatusStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dal.ShowTablesStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dal.UseStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.AlterUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.CreateUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DenyUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropLoginStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.DropUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.GrantStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.RenameUserStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.RevokeStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetPasswordStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl.SetRoleStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.ddl.AlterIndexStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.ddl.AlterTableStatementTestCase
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.ddl.CreateIndexStatementTestCase
;
...
...
@@ -125,6 +137,42 @@ public final class SQLParserTestCases {
@XmlElement
(
name
=
"create-user"
)
private
final
List
<
CreateUserStatementTestCase
>
createUserTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"alter-user"
)
private
final
List
<
AlterUserStatementTestCase
>
alterUserTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"drop-user"
)
private
final
List
<
DropUserStatementTestCase
>
dropUserTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"rename-user"
)
private
final
List
<
RenameUserStatementTestCase
>
renameUserTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"deny-user"
)
private
final
List
<
DenyUserStatementTestCase
>
denyUserTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"create-login"
)
private
final
List
<
CreateLoginStatementTestCase
>
createLoginTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"alter-login"
)
private
final
List
<
AlterLoginStatementTestCase
>
alterLoginTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"drop-login"
)
private
final
List
<
DropLoginStatementTestCase
>
dropLoginTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"create-role"
)
private
final
List
<
CreateRoleStatementTestCase
>
createRoleTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"alter-role"
)
private
final
List
<
AlterRoleStatementTestCase
>
alterRoleTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"drop-role"
)
private
final
List
<
DropRoleStatementTestCase
>
dropRoleTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"set-role"
)
private
final
List
<
SetRoleStatementTestCase
>
setRoleTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"set-password"
)
private
final
List
<
SetPasswordStatementTestCase
>
setPasswordTestCases
=
new
LinkedList
<>();
@XmlElement
(
name
=
"use"
)
private
final
List
<
UseStatementTestCase
>
useTestCases
=
new
LinkedList
<>();
...
...
@@ -182,6 +230,18 @@ public final class SQLParserTestCases {
result
.
putAll
(
getSQLParserTestCases
(
grantTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
revokeTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
createUserTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
alterUserTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
dropUserTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
renameUserTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
denyUserTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
createLoginTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
alterLoginTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
dropLoginTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
createRoleTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
alterRoleTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
dropRoleTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
setRoleTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
setPasswordTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
useTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
describeTestCases
));
result
.
putAll
(
getSQLParserTestCases
(
showDatabasesTestCases
));
...
...
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterLoginStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Alter login statement test case.
*
* @author zhangliang
*/
public
final
class
AlterLoginStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterRoleStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Alter role statement test case.
*
* @author zhangliang
*/
public
final
class
AlterRoleStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/AlterUserStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Alter user statement test case.
*
* @author zhangliang
*/
public
final
class
AlterUserStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/CreateLoginStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Create login statement test case.
*
* @author zhangliang
*/
public
final
class
CreateLoginStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/CreateRoleStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Create role statement test case.
*
* @author zhangliang
*/
public
final
class
CreateRoleStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DenyUserStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.segment.impl.table.ExpectedTable
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
import
javax.xml.bind.annotation.XmlElement
;
/**
* Deny user statement test case.
*
* @author zhangliang
*/
@Getter
@Setter
public
final
class
DenyUserStatementTestCase
extends
SQLParserTestCase
{
@XmlElement
private
ExpectedTable
table
;
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropLoginStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Drop login statement test case.
*
* @author zhangliang
*/
public
final
class
DropLoginStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropRoleStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Drop role statement test case.
*
* @author zhangliang
*/
public
final
class
DropRoleStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/DropUserStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Drop user statement test case.
*
* @author zhangliang
*/
public
final
class
DropUserStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/RenameUserStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Rename user statement test case.
*
* @author zhangliang
*/
public
final
class
RenameUserStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/SetPasswordStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Set password statement test case.
*
* @author zhangliang
*/
public
final
class
SetPasswordStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/statement/dcl/SetRoleStatementTestCase.java
0 → 100644
浏览文件 @
0f908c32
/*
* 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.
*/
package
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.dcl
;
import
org.apache.shardingsphere.sql.parser.integrate.jaxb.statement.SQLParserTestCase
;
/**
* Set role statement test case.
*
* @author zhangliang
*/
public
final
class
SetRoleStatementTestCase
extends
SQLParserTestCase
{
}
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-login.xml
浏览文件 @
0f908c32
...
...
@@ -17,14 +17,15 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"alter_login_enable"
/>
<common
sql-case-id=
"alter_login_set_password"
/>
<common
sql-case-id=
"alter_login_set_hashed_password"
/>
<common
sql-case-id=
"alter_login_set_password_with_old_password"
/>
<common
sql-case-id=
"alter_login_set_default_database"
/>
<common
sql-case-id=
"create_login_set_expired_password"
/>
<common
sql-case-id=
"alter_login_add_credential"
/>
<common
sql-case-id=
"alter_login_drop_credential"
/>
<common
sql-case-id=
"alter_login_unlock"
/>
<common
sql-case-id=
"alter_login_rename"
/>
<alter-login
sql-case-id=
"alter_login_enable"
/>
<alter-login
sql-case-id=
"alter_login_name"
/>
<alter-login
sql-case-id=
"alter_login_passwd"
/>
<alter-login
sql-case-id=
"alter_login_set_password"
/>
<alter-login
sql-case-id=
"alter_login_set_hashed_password"
/>
<alter-login
sql-case-id=
"alter_login_set_password_with_old_password"
/>
<alter-login
sql-case-id=
"alter_login_set_default_database"
/>
<alter-login
sql-case-id=
"alter_login_add_credential"
/>
<alter-login
sql-case-id=
"alter_login_drop_credential"
/>
<alter-login
sql-case-id=
"alter_login_unlock"
/>
<alter-login
sql-case-id=
"alter_login_rename"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,25 +17,25 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"alter_no_identified_role"
/>
<
common
sql-case-id=
"alter_external_role"
/>
<
common
sql-case-id=
"alter_global_role"
/>
<
common
sql-case-id=
"alter_role_with_password"
/>
<
common
sql-case-id=
"alter_role_with_container"
/>
<
common
sql-case-id=
"alter_role_with_password_postgresql"
/>
<
common
sql-case-id=
"alter_current_user_with_password"
/>
<
common
sql-case-id=
"alter_role_with_option"
/>
<
common
sql-case-id=
"alter_role_with_options"
/>
<
common
sql-case-id=
"rename_role"
/>
<
common
sql-case-id=
"alter_role_set_config"
/>
<
common
sql-case-id=
"alter_all_roles_set_config"
/>
<
common
sql-case-id=
"alter_role_set_config_in_database"
/>
<
common
sql-case-id=
"alter_role_set_config_from_current_user"
/>
<
common
sql-case-id=
"alter_role_reset_config"
/>
<
common
sql-case-id=
"alter_all_roles_reset_config"
/>
<
common
sql-case-id=
"alter_role_reset_config_in_database"
/>
<
common
sql-case-id=
"alter_role_reset_all_config"
/>
<
common
sql-case-id=
"alter_role_add_member"
/>
<
common
sql-case-id=
"alter_role_drop_member"
/>
<
common
sql-case-id=
"alter_role_rename"
/>
<
alter-role
sql-case-id=
"alter_no_identified_role"
/>
<
alter-role
sql-case-id=
"alter_external_role"
/>
<
alter-role
sql-case-id=
"alter_global_role"
/>
<
alter-role
sql-case-id=
"alter_role_with_password"
/>
<
alter-role
sql-case-id=
"alter_role_with_container"
/>
<
alter-role
sql-case-id=
"alter_role_with_password_postgresql"
/>
<
alter-role
sql-case-id=
"alter_current_user_with_password"
/>
<
alter-role
sql-case-id=
"alter_role_with_option"
/>
<
alter-role
sql-case-id=
"alter_role_with_options"
/>
<
alter-role
sql-case-id=
"rename_role"
/>
<
alter-role
sql-case-id=
"alter_role_set_config"
/>
<
alter-role
sql-case-id=
"alter_all_roles_set_config"
/>
<
alter-role
sql-case-id=
"alter_role_set_config_in_database"
/>
<
alter-role
sql-case-id=
"alter_role_set_config_from_current_user"
/>
<
alter-role
sql-case-id=
"alter_role_reset_config"
/>
<
alter-role
sql-case-id=
"alter_all_roles_reset_config"
/>
<
alter-role
sql-case-id=
"alter_role_reset_config_in_database"
/>
<
alter-role
sql-case-id=
"alter_role_reset_all_config"
/>
<
alter-role
sql-case-id=
"alter_role_add_member"
/>
<
alter-role
sql-case-id=
"alter_role_drop_member"
/>
<
alter-role
sql-case-id=
"alter_role_rename"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/alter-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,54 +17,50 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"alter_user_identified_without_hostname"
/>
<common
sql-case-id=
"alter_user_identified_with_hostname"
/>
<common
sql-case-id=
"alter_user_account"
/>
<common
sql-case-id=
"alter_login_name"
/>
<common
sql-case-id=
"alter_login_passwd"
/>
<common
sql-case-id=
"alter_user_name_with_name"
/>
<common
sql-case-id=
"alter_user_name_rename"
/>
<common
sql-case-id=
"alter_user_passwd_with_equality"
/>
<common
sql-case-id=
"alter_user_passwd_without_equality"
/>
<common
sql-case-id=
"alter_role_add_member"
/>
<common
sql-case-id=
"alter_role_drop_member"
/>
<common
sql-case-id=
"alter_user"
/>
<common
sql-case-id=
"alter_users"
/>
<common
sql-case-id=
"alter_user_if_exists"
/>
<common
sql-case-id=
"alter_local_user"
/>
<common
sql-case-id=
"alter_user_with_password"
/>
<common
sql-case-id=
"alter_user_with_resource_option"
/>
<common
sql-case-id=
"alter_user_with_resource_options"
/>
<common
sql-case-id=
"alter_user_with_password_option"
/>
<common
sql-case-id=
"alter_user_with_password_options"
/>
<common
sql-case-id=
"alter_user_with_lock_option"
/>
<common
sql-case-id=
"alter_user_with_options"
/>
<common
sql-case-id=
"alter_external_user"
/>
<common
sql-case-id=
"alter_global_user"
/>
<common
sql-case-id=
"alter_user_with_tablespace_option"
/>
<common
sql-case-id=
"alter_user_with_container"
/>
<common
sql-case-id=
"alter_user_with_quota_option"
/>
<common
sql-case-id=
"alter_user_password_with_lock_option"
/>
<common
sql-case-id=
"alter_user_expire_with_options"
/>
<common
sql-case-id=
"alter_user_grant_proxy"
/>
<common
sql-case-id=
"alter_user_grant_proxy_with_option"
/>
<common
sql-case-id=
"alter_user_revoke_proxy"
/>
<common
sql-case-id=
"alter_user_proxys"
/>
<common
sql-case-id=
"alter_user_with_password_postgresql"
/>
<common
sql-case-id=
"alter_current_user_with_password"
/>
<common
sql-case-id=
"alter_user_with_option"
/>
<common
sql-case-id=
"alter_user_with_options_postgresql"
/>
<common
sql-case-id=
"rename_user"
/>
<common
sql-case-id=
"alter_user_set_config"
/>
<common
sql-case-id=
"alter_all_users_set_config"
/>
<common
sql-case-id=
"alter_user_set_config_in_database"
/>
<common
sql-case-id=
"alter_user_set_config_from_current_user"
/>
<common
sql-case-id=
"alter_user_reset_config"
/>
<common
sql-case-id=
"alter_all_users_reset_config"
/>
<common
sql-case-id=
"alter_user_reset_config_in_database"
/>
<common
sql-case-id=
"alter_user_reset_all_config"
/>
<common
sql-case-id=
"alter_user_set_password"
/>
<common
sql-case-id=
"alter_user_set_login"
/>
<common
sql-case-id=
"alter_user_set_default_schema"
/>
<common
sql-case-id=
"alter_user_rename"
/>
<alter-user
sql-case-id=
"alter_user_identified_without_hostname"
/>
<alter-user
sql-case-id=
"alter_user_identified_with_hostname"
/>
<alter-user
sql-case-id=
"alter_user_account"
/>
<alter-user
sql-case-id=
"alter_user_name_with_name"
/>
<alter-user
sql-case-id=
"alter_user_name_rename"
/>
<alter-user
sql-case-id=
"alter_user_passwd_with_equality"
/>
<alter-user
sql-case-id=
"alter_user_passwd_without_equality"
/>
<alter-user
sql-case-id=
"alter_user"
/>
<alter-user
sql-case-id=
"alter_users"
/>
<alter-user
sql-case-id=
"alter_user_if_exists"
/>
<alter-user
sql-case-id=
"alter_local_user"
/>
<alter-user
sql-case-id=
"alter_user_with_password"
/>
<alter-user
sql-case-id=
"alter_user_with_resource_option"
/>
<alter-user
sql-case-id=
"alter_user_with_resource_options"
/>
<alter-user
sql-case-id=
"alter_user_with_password_option"
/>
<alter-user
sql-case-id=
"alter_user_with_password_options"
/>
<alter-user
sql-case-id=
"alter_user_with_lock_option"
/>
<alter-user
sql-case-id=
"alter_user_with_options"
/>
<alter-user
sql-case-id=
"alter_external_user"
/>
<alter-user
sql-case-id=
"alter_global_user"
/>
<alter-user
sql-case-id=
"alter_user_with_tablespace_option"
/>
<alter-user
sql-case-id=
"alter_user_with_container"
/>
<alter-user
sql-case-id=
"alter_user_with_quota_option"
/>
<alter-user
sql-case-id=
"alter_user_password_with_lock_option"
/>
<alter-user
sql-case-id=
"alter_user_expire_with_options"
/>
<alter-user
sql-case-id=
"alter_user_grant_proxy"
/>
<alter-user
sql-case-id=
"alter_user_grant_proxy_with_option"
/>
<alter-user
sql-case-id=
"alter_user_revoke_proxy"
/>
<alter-user
sql-case-id=
"alter_user_proxys"
/>
<alter-user
sql-case-id=
"alter_user_with_password_postgresql"
/>
<alter-user
sql-case-id=
"alter_current_user_with_password"
/>
<alter-user
sql-case-id=
"alter_user_with_option"
/>
<alter-user
sql-case-id=
"alter_user_with_options_postgresql"
/>
<alter-user
sql-case-id=
"rename_user"
/>
<alter-user
sql-case-id=
"alter_user_set_config"
/>
<alter-user
sql-case-id=
"alter_all_users_set_config"
/>
<alter-user
sql-case-id=
"alter_user_set_config_in_database"
/>
<alter-user
sql-case-id=
"alter_user_set_config_from_current_user"
/>
<alter-user
sql-case-id=
"alter_user_reset_config"
/>
<alter-user
sql-case-id=
"alter_all_users_reset_config"
/>
<alter-user
sql-case-id=
"alter_user_reset_config_in_database"
/>
<alter-user
sql-case-id=
"alter_user_reset_all_config"
/>
<alter-user
sql-case-id=
"alter_user_set_password"
/>
<alter-user
sql-case-id=
"alter_user_set_login"
/>
<alter-user
sql-case-id=
"alter_user_set_default_schema"
/>
<alter-user
sql-case-id=
"alter_user_rename"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-login.xml
浏览文件 @
0f908c32
...
...
@@ -17,11 +17,12 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"create_login_with_password"
/>
<common
sql-case-id=
"create_login_with_hashed_password"
/>
<common
sql-case-id=
"create_login_with_default_database"
/>
<common
sql-case-id=
"create_login_with_expired_password"
/>
<common
sql-case-id=
"create_login_to_credential"
/>
<common
sql-case-id=
"create_login_with_certificate"
/>
<common
sql-case-id=
"create_login_with_asym_key"
/>
<create-login
sql-case-id=
"create_login"
/>
<create-login
sql-case-id=
"create_login_with_password"
/>
<create-login
sql-case-id=
"create_login_with_hashed_password"
/>
<create-login
sql-case-id=
"create_login_with_default_database"
/>
<create-login
sql-case-id=
"create_login_with_expired_password"
/>
<create-login
sql-case-id=
"create_login_to_credential"
/>
<create-login
sql-case-id=
"create_login_with_certificate"
/>
<create-login
sql-case-id=
"create_login_with_asym_key"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,17 +17,19 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"create_role"
/>
<common
sql-case-id=
"create_roles"
/>
<common
sql-case-id=
"create_role_if_not_exists"
/>
<common
sql-case-id=
"create_no_identified_role"
/>
<common
sql-case-id=
"create_external_role"
/>
<common
sql-case-id=
"create_global_role"
/>
<common
sql-case-id=
"create_role_with_password"
/>
<common
sql-case-id=
"create_role_with_container"
/>
<common
sql-case-id=
"create_role_with_role"
/>
<common
sql-case-id=
"create_role_with_roles"
/>
<common
sql-case-id=
"create_role_with_option"
/>
<common
sql-case-id=
"create_role_with_options"
/>
<common
sql-case-id=
"create_role_authorization"
/>
<create-role
sql-case-id=
"create_role"
/>
<create-role
sql-case-id=
"create_roles"
/>
<create-role
sql-case-id=
"create_role_if_not_exists"
/>
<create-role
sql-case-id=
"create_no_identified_role"
/>
<create-role
sql-case-id=
"create_external_role"
/>
<create-role
sql-case-id=
"create_global_role"
/>
<create-role
sql-case-id=
"create_role_with_password"
/>
<create-role
sql-case-id=
"create_role_with_container"
/>
<create-role
sql-case-id=
"create_role_with_role"
/>
<create-role
sql-case-id=
"create_role_with_roles"
/>
<create-role
sql-case-id=
"create_role_with_option"
/>
<create-role
sql-case-id=
"create_role_with_options"
/>
<create-role
sql-case-id=
"create_role_authorization"
/>
<create-role
sql-case-id=
"create_role_identified_by"
/>
<create-role
sql-case-id=
"create_role_password"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/create-user.xml
浏览文件 @
0f908c32
...
...
@@ -23,10 +23,6 @@
<create-user
sql-case-id=
"create_user_identified_by_without_hostname"
/>
<create-user
sql-case-id=
"create_user_identified_by_for"
/>
<create-user
sql-case-id=
"create_user_password"
/>
<create-user
sql-case-id=
"create_login"
/>
<create-user
sql-case-id=
"create_role"
/>
<create-user
sql-case-id=
"create_role_identified_by"
/>
<create-user
sql-case-id=
"create_role_password"
/>
<create-user
sql-case-id=
"create_user"
/>
<create-user
sql-case-id=
"create_users"
/>
<create-user
sql-case-id=
"create_user_if_not_exists"
/>
...
...
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/deny-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,27 +17,27 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"deny_user"
>
<
deny-user
sql-case-id=
"deny_user"
>
<table
name=
"t_order"
start-index=
"15"
stop-index=
"21"
/>
</
common
>
</
deny-user
>
<
common
sql-case-id=
"deny_select"
>
<
deny-user
sql-case-id=
"deny_select"
>
<table
name=
"t_order"
start-index=
"15"
stop-index=
"21"
/>
</
common
>
</
deny-user
>
<
common
sql-case-id=
"deny_select_column"
>
<
deny-user
sql-case-id=
"deny_select_column"
>
<table
name=
"t_order"
start-index=
"26"
stop-index=
"32"
/>
</
common
>
</
deny-user
>
<
common
sql-case-id=
"deny_select_to_users"
>
<
deny-user
sql-case-id=
"deny_select_to_users"
>
<table
name=
"t_order"
start-index=
"26"
stop-index=
"32"
/>
</
common
>
</
deny-user
>
<
common
sql-case-id=
"deny_crud"
>
<
deny-user
sql-case-id=
"deny_crud"
>
<table
name=
"t_order"
start-index=
"39"
stop-index=
"45"
/>
</
common
>
</
deny-user
>
<
common
sql-case-id=
"deny_all"
>
<
deny-user
sql-case-id=
"deny_all"
>
<table
name=
"t_order"
start-index=
"23"
stop-index=
"29"
/>
</
common
>
</
deny-user
>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-login.xml
浏览文件 @
0f908c32
...
...
@@ -17,5 +17,5 @@
-->
<sql-parser-test-cases>
<
commo
n
sql-case-id=
"drop_login"
/>
<
drop-logi
n
sql-case-id=
"drop_login"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,7 +17,7 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"drop_role"
/>
<
common
sql-case-id=
"drop_roles"
/>
<
common
sql-case-id=
"drop_role_if_exists"
/>
<
drop-role
sql-case-id=
"drop_role"
/>
<
drop-role
sql-case-id=
"drop_roles"
/>
<
drop-role
sql-case-id=
"drop_role_if_exists"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/drop-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,12 +17,10 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"drop_user_without_hostname"
/>
<common
sql-case-id=
"drop_user_with_hostname"
/>
<common
sql-case-id=
"drop_user_cascade"
/>
<common
sql-case-id=
"drop_role"
/>
<common
sql-case-id=
"drop_login"
/>
<common
sql-case-id=
"drop_user"
/>
<common
sql-case-id=
"drop_users"
/>
<common
sql-case-id=
"drop_user_if_exists"
/>
<drop-user
sql-case-id=
"drop_user_without_hostname"
/>
<drop-user
sql-case-id=
"drop_user_with_hostname"
/>
<drop-user
sql-case-id=
"drop_user_cascade"
/>
<drop-user
sql-case-id=
"drop_user"
/>
<drop-user
sql-case-id=
"drop_users"
/>
<drop-user
sql-case-id=
"drop_user_if_exists"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/rename-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,6 +17,6 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"rename_user"
/>
<
common
sql-case-id=
"rename_users"
/>
<
rename-user
sql-case-id=
"rename_user"
/>
<
rename-user
sql-case-id=
"rename_users"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/set-password.xml
浏览文件 @
0f908c32
...
...
@@ -17,9 +17,9 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"set_password"
/>
<
common
sql-case-id=
"set_password_for_user"
/>
<
common
sql-case-id=
"set_password_for_local_user"
/>
<
common
sql-case-id=
"replace_password"
/>
<
common
sql-case-id=
"set_password_and_retain"
/>
<
set-password
sql-case-id=
"set_password"
/>
<
set-password
sql-case-id=
"set_password_for_user"
/>
<
set-password
sql-case-id=
"set_password_for_local_user"
/>
<
set-password
sql-case-id=
"replace_password"
/>
<
set-password
sql-case-id=
"set_password_and_retain"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dcl/set-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,11 +17,15 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"set_role"
/>
<common
sql-case-id=
"set_roles"
/>
<common
sql-case-id=
"set_none_role"
/>
<common
sql-case-id=
"set_default_role"
/>
<common
sql-case-id=
"set_all_role"
/>
<common
sql-case-id=
"set_all_expect_role"
/>
<common
sql-case-id=
"set_all_expect_roles"
/>
<set-role
sql-case-id=
"set_role"
/>
<set-role
sql-case-id=
"set_roles"
/>
<set-role
sql-case-id=
"set_none_role"
/>
<set-role
sql-case-id=
"set_default_role"
/>
<set-role
sql-case-id=
"set_all_role"
/>
<set-role
sql-case-id=
"set_all_expect_role"
/>
<set-role
sql-case-id=
"set_all_expect_roles"
/>
<set-role
sql-case-id=
"set_default_none_role"
/>
<set-role
sql-case-id=
"set_default_all_role"
/>
<set-role
sql-case-id=
"set_default_role_to_user"
/>
<set-role
sql-case-id=
"set_default_roles_to_users"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/alter-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,16 +17,16 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"alter_user_identified_with_hostname"
/>
<
common
sql-case-id=
"alter_user"
/>
<
common
sql-case-id=
"alter_users"
/>
<
common
sql-case-id=
"alter_user_if_exists"
/>
<
common
sql-case-id=
"alter_local_user"
/>
<
common
sql-case-id=
"alter_user_with_password"
/>
<
common
sql-case-id=
"alter_user_with_resource_option"
/>
<
common
sql-case-id=
"alter_user_with_resource_options"
/>
<
common
sql-case-id=
"alter_user_with_password_option"
/>
<
common
sql-case-id=
"alter_user_with_password_options"
/>
<
common
sql-case-id=
"alter_user_with_lock_option"
/>
<
common
sql-case-id=
"alter_user_with_options"
/>
<
alter-user
sql-case-id=
"alter_user_identified_with_hostname"
/>
<
alter-user
sql-case-id=
"alter_user"
/>
<
alter-user
sql-case-id=
"alter_users"
/>
<
alter-user
sql-case-id=
"alter_user_if_exists"
/>
<
alter-user
sql-case-id=
"alter_local_user"
/>
<
alter-user
sql-case-id=
"alter_user_with_password"
/>
<
alter-user
sql-case-id=
"alter_user_with_resource_option"
/>
<
alter-user
sql-case-id=
"alter_user_with_resource_options"
/>
<
alter-user
sql-case-id=
"alter_user_with_password_option"
/>
<
alter-user
sql-case-id=
"alter_user_with_password_options"
/>
<
alter-user
sql-case-id=
"alter_user_with_lock_option"
/>
<
alter-user
sql-case-id=
"alter_user_with_options"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/create-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,7 +17,7 @@
-->
<sql-parser-test-cases>
<c
ommon
sql-case-id=
"create_role"
/>
<c
ommon
sql-case-id=
"create_roles"
/>
<c
ommon
sql-case-id=
"create_role_if_not_exists"
/>
<c
reate-role
sql-case-id=
"create_role"
/>
<c
reate-role
sql-case-id=
"create_roles"
/>
<c
reate-role
sql-case-id=
"create_role_if_not_exists"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/drop-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,7 +17,7 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"drop_role"
/>
<
common
sql-case-id=
"drop_roles"
/>
<
common
sql-case-id=
"drop_role_if_exists"
/>
<
drop-role
sql-case-id=
"drop_role"
/>
<
drop-role
sql-case-id=
"drop_roles"
/>
<
drop-role
sql-case-id=
"drop_role_if_exists"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/drop-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,8 +17,8 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"drop_user_with_hostname"
/>
<
common
sql-case-id=
"drop_user"
/>
<
common
sql-case-id=
"drop_users"
/>
<
common
sql-case-id=
"drop_user_if_exists"
/>
<
drop-user
sql-case-id=
"drop_user_with_hostname"
/>
<
drop-user
sql-case-id=
"drop_user"
/>
<
drop-user
sql-case-id=
"drop_users"
/>
<
drop-user
sql-case-id=
"drop_user_if_exists"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/rename-user.xml
浏览文件 @
0f908c32
...
...
@@ -17,6 +17,6 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"rename_user"
/>
<
common
sql-case-id=
"rename_users"
/>
<
rename-user
sql-case-id=
"rename_user"
/>
<
rename-user
sql-case-id=
"rename_users"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/set-default-role.xml
已删除
100644 → 0
浏览文件 @
a42438ac
<?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-parser-test-cases>
<common
sql-case-id=
"set_none_role"
/>
<common
sql-case-id=
"set_all_role"
/>
<common
sql-case-id=
"set_role"
/>
<common
sql-case-id=
"set_roles_to_users"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/visitor/dcl/set-password.xml
浏览文件 @
0f908c32
...
...
@@ -17,9 +17,9 @@
-->
<sql-parser-test-cases>
<
common
sql-case-id=
"set_password"
/>
<
common
sql-case-id=
"set_password_for_user"
/>
<
common
sql-case-id=
"set_password_for_local_user"
/>
<
common
sql-case-id=
"replace_password"
/>
<
common
sql-case-id=
"set_password_and_retain"
/>
<
set-password
sql-case-id=
"set_password"
/>
<
set-password
sql-case-id=
"set_password_for_user"
/>
<
set-password
sql-case-id=
"set_password_for_local_user"
/>
<
set-password
sql-case-id=
"replace_password"
/>
<
set-password
sql-case-id=
"set_password_and_retain"
/>
</sql-parser-test-cases>
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/
sql/dcl/set-defaul
t-role.xml
→
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/
visitor/dcl/se
t-role.xml
浏览文件 @
0f908c32
...
...
@@ -17,8 +17,9 @@
-->
<sql-parser-test-cases>
<common
sql-case-id=
"set_none_role"
/>
<common
sql-case-id=
"set_all_role"
/>
<common
sql-case-id=
"set_role"
/>
<common
sql-case-id=
"set_roles_to_users"
/>
<!-- FIXME -->
<!--<set-role sql-case-id="set_default_none_role" />-->
<!--<set-role sql-case-id="set_default_all_role" />-->
<!--<set-role sql-case-id="set_default_role" />-->
<!--<set-role sql-case-id="set_default_roles_to_users" />-->
</sql-parser-test-cases>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录