This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 84cdd81 Update RDL document for #12837. (#12996)
84cdd81 is described below
commit 84cdd81b586bb3a3fab28e3c39245b998d99aca7
Author: Raigor <[email protected]>
AuthorDate: Tue Oct 12 10:13:48 2021 +0800
Update RDL document for #12837. (#12996)
---
.../content/features/dist-sql/syntax/rdl/rdl-resource.cn.md | 6 ++++--
.../content/features/dist-sql/syntax/rdl/rdl-resource.en.md | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git
a/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.cn.md
b/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.cn.md
index 4fb8e63..8cfcf45 100644
--- a/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.cn.md
+++ b/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.cn.md
@@ -22,7 +22,7 @@ urlSource:
poolProperty:
"key"= ("value" | value)
-DROP RESOURCE dataSourceName [, dataSourceName] ...
+DROP RESOURCE dataSourceName [, dataSourceName] ... [ignore single tables]
```
- 添加资源前请确认已经创建分布式数据库,并执行 `use` 命令成功选择一个数据库
@@ -33,6 +33,7 @@ DROP RESOURCE dataSourceName [, dataSourceName] ...
- `ALTER RESOURCE` 修改资源时会发生连接池的切换,这个操作可能对进行中的业务造成影响,请谨慎使用
- `DROP RESOURCE` 只会删除逻辑资源,不会删除真实的数据源
- 被规则引用的资源将无法被删除
+- 若资源只被 `single table rule` 引用,且用户确认可以忽略该限制,则可以添加可选参数 `ignore single tables`
进行强制删除
## 示例
@@ -74,5 +75,6 @@ ALTER RESOURCE resource_0 (
PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000")
)
-DROP RESOURCE resource_0, resource_1, resource_2, resource_3;
+DROP RESOURCE resource_0, resource_1;
+DROP RESOURCE resource_2, resource_3 ignore single tables;
```
diff --git
a/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.en.md
b/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.en.md
index 10b72d8..585f2ea 100644
--- a/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.en.md
+++ b/docs/document/content/features/dist-sql/syntax/rdl/rdl-resource.en.md
@@ -22,7 +22,7 @@ urlSource:
poolProperty:
"key"= ("value" | value)
-DROP RESOURCE dataSourceName [, dataSourceName] ...
+DROP RESOURCE dataSourceName [, dataSourceName] ... [ignore single tables]
```
- Before adding resources, please confirm that a distributed database has been
created, and execute the `use` command to successfully select a database
@@ -33,6 +33,7 @@ DROP RESOURCE dataSourceName [, dataSourceName] ...
- `ALTER RESOURCE` will switch the connection pool. This operation may affect
the ongoing business, please use it with caution
- `DROP RESOURCE` will only delete logical resources, not real data sources
- Resources referenced by rules cannot be deleted
+- If the resource is only referenced by `single table rule`, and the user
confirms that the restriction can be ignored, the optional parameter `ignore
single tables` can be added to perform forced deletion
## Example
@@ -74,5 +75,6 @@ ALTER RESOURCE resource_0 (
PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000")
)
-DROP RESOURCE resource_0, resource_1, resource_2, resource_3;
+DROP RESOURCE resource_0, resource_1;
+DROP RESOURCE resource_2, resource_3 ignore single tables;
```