This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 c1519b3a8d6 Add documents for DistSQL RUL. (#19719)
c1519b3a8d6 is described below
commit c1519b3a8d6edf24aba34e1c94f4a9f2e68f00ef
Author: Raigor <[email protected]>
AuthorDate: Sun Jul 31 16:18:50 2022 +0800
Add documents for DistSQL RUL. (#19719)
* Moved Observability's manual to Proxy.
* Add documents for RUL.
* Update doc weight.
---
.../document/content/features/distsql/_index.cn.md | 7 +++--
.../document/content/features/distsql/_index.en.md | 7 +++--
.../distsql/syntax/ral/_index.cn.md | 34 ++++++++++------------
.../distsql/syntax/ral/_index.en.md | 33 ++++++++++-----------
.../distsql/syntax/rul/_index.cn.md | 15 ++++++++++
.../distsql/syntax/rul/_index.en.md | 15 ++++++++++
6 files changed, 72 insertions(+), 39 deletions(-)
diff --git a/docs/document/content/features/distsql/_index.cn.md
b/docs/document/content/features/distsql/_index.cn.md
index e2263a40385..32f86b79713 100644
--- a/docs/document/content/features/distsql/_index.cn.md
+++ b/docs/document/content/features/distsql/_index.cn.md
@@ -14,7 +14,7 @@ DistSQL(Distributed SQL)是 Apache ShardingSphere 特有的操作语言。
从 5.x 版本开始,DistSQL(Distributed SQL)让用户可以像操作数据库一样操作 Apache
ShardingSphere,使其从面向开发人员的框架和中间件转变为面向运维人员的数据库产品。
## 相关概念
-DistSQL 细分为 RDL、RQL 和 RAL 三种类型。
+DistSQL 细分为 RDL、RQL、RAL 和 RUL 四种类型。
### RDL
Resource & Rule Definition Language,负责资源和规则的创建、修改和删除。
@@ -23,7 +23,10 @@ Resource & Rule Definition Language,负责资源和规则的创建、修改和
Resource & Rule Query Language,负责资源和规则的查询和展现。
### RAL
-Resource & Rule Administration Language,负责 Hint、事务类型切换、分片执行计划查询等管理功能。
+Resource & Rule Administration Language,负责强制路由、熔断、配置导入导出、数据迁移控制等管理功能。
+
+### RUL
+Resource Utility Language,负责 SQL 解析、SQL 格式化、执行计划预览等功能。
## 对系统的影响
diff --git a/docs/document/content/features/distsql/_index.en.md
b/docs/document/content/features/distsql/_index.en.md
index c924b243782..ebd2d71652e 100644
--- a/docs/document/content/features/distsql/_index.en.md
+++ b/docs/document/content/features/distsql/_index.en.md
@@ -14,7 +14,7 @@ When using 4.x and earlier versions, developers can operate
data just like using
Starting from version 5.x, DistSQL enables users to operate Apache
ShardingSphere just like a database, transforming it from a framework and
middleware for developers to a database product for DBAs.
## Related Concepts
-DistSQL is divided into RDL, RQL, and RAL.
+DistSQL is divided into RDL, RQL, RAL and RUL.
### RDL
Resource & Rule Definition Language, is responsible for the definition of
resources and rules.
@@ -23,7 +23,10 @@ Resource & Rule Definition Language, is responsible for the
definition of resour
Resource & Rule Query Language, is responsible for the query of resources and
rules.
### RAL
-Resource & Rule Administration Language, is responsible for the added-on
administrator features of hint, transaction type switch, sharding execute
planning, etc.
+Resource & Rule Administration Language, is responsible for hint, circuit
breaker, configuration import and export, scaling control and other management
functions.
+
+### RUL
+Resource Utility Language, is responsible for SQL parsing, SQL formatting,
preview execution plan, etc.
## Impact on the System
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
index e2aea4f95c8..31ead6ee630 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
@@ -4,8 +4,7 @@ weight = 3
chapter = true
+++
-RAL (Resource & Rule Administration Language) 为 Apache ShardingSphere 的管理语言,
-负责强制路由、事务类型切换、弹性伸缩、分片执行计划查询等增量功能的操作。
+RAL (Resource & Rule Administration Language) 为 Apache ShardingSphere
的管理语言,负责强制路由、熔断、配置导入导出、数据迁移控制等管理功能。
## 强制路由
@@ -57,22 +56,21 @@ RAL (Resource & Rule Administration Language) 为 Apache
ShardingSphere 的管
## 其他
-| 语句 |
说明
| 示例
|
-|:-------------------------------------------------------------------------
|:---------------------------------------------------------------------------------------------------------------
|:------------------------------------------------ |
-| SHOW INSTANCE MODE |
查询当前 proxy 的 mode 配置
| SHOW INSTANCE MODE |
-| COUNT DATABASE RULES [FROM database] |
查询 database 中的规则数量
| COUNT DATABASE RULES |
-| SET VARIABLE proxy_property_name = xx |
proxy_property_name 为 proxy
的[属性配置](/cn/user-manual/shardingsphere-proxy/yaml-config/props/) ,需使用下划线命名 |
SET VARIABLE sql_show = true |
-| SET VARIABLE transaction_type = xx |
修改当前连接的事务类型, 支持 LOCAL,XA,BASE
| SET VARIABLE transaction_type = XA |
-| SET VARIABLE agent_plugins_enabled = [TRUE / FALSE] |
设置 agent 插件的启用状态,默认值 false
| SET VARIABLE agent_plugins_enabled = TRUE |
-| SHOW ALL VARIABLES |
查询 proxy 所有的属性配置
| SHOW ALL VARIABLES |
-| SHOW VARIABLE variable_name |
查询 proxy 属性,需使用下划线命名
| SHOW VARIABLE sql_show |
-| PREVIEW SQL |
预览实际 SQL
| PREVIEW SELECT * FROM t_order
|
-| PARSE SQL |
解析 SQL 并输出抽象语法树
| PARSE SELECT * FROM t_order |
-| REFRESH TABLE METADATA |
刷新所有表的元数据
| REFRESH TABLE METADATA |
-| REFRESH TABLE METADATA [tableName / tableName FROM RESOURCE resourceName] |
刷新指定表的元数据
| REFRESH TABLE METADATA t_order FROM RESOURCE ds_1 |
-| SHOW TABLE METADATA tableName [, tableName] ... |
查询表的元数据
| SHOW TABLE METADATA t_order
|
-| EXPORT DATABASE CONFIG [FROM database_name] [, file="file_path"] |
查询 / 导出 database 中的资源和规则配置
| EXPORT DATABASE CONFIG FROM readwrite_splitting_db |
-| SHOW RULES USED RESOURCE resourceName [from database] |
查询 database 中使用指定资源的规则
| SHOW RULES USED RESOURCE ds_0 FROM databaseName |
+| 语句 |
说明
| 示例
|
+|:--------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------|
+| SHOW INSTANCE MODE |
查询当前 proxy 的 mode 配置
| SHOW INSTANCE MODE
|
+| COUNT DATABASE RULES [FROM database] |
查询 database 中的规则数量
| COUNT DATABASE RULES
|
+| SET VARIABLE proxy_property_name = xx |
proxy_property_name 为 proxy
的[属性配置](/cn/user-manual/shardingsphere-proxy/yaml-config/props/) ,需使用下划线命名 |
SET VARIABLE sql_show = true |
+| SET VARIABLE transaction_type = xx |
修改当前连接的事务类型, 支持 LOCAL,XA,BASE
| SET VARIABLE transaction_type = XA
|
+| SET VARIABLE agent_plugins_enabled = [TRUE / FALSE] |
设置 agent 插件的启用状态,默认值 false
| SET VARIABLE agent_plugins_enabled = TRUE
|
+| SHOW ALL VARIABLES |
查询 proxy 所有的属性配置
| SHOW ALL VARIABLES
|
+| SHOW VARIABLE variable_name |
查询 proxy 属性,需使用下划线命名
| SHOW VARIABLE sql_show
|
+| REFRESH TABLE METADATA |
刷新所有表的元数据
| REFRESH TABLE METADATA
|
+| REFRESH TABLE METADATA [tableName / tableName FROM RESOURCE resourceName] |
刷新指定表的元数据
| REFRESH TABLE METADATA t_order FROM RESOURCE ds_1
|
+| SHOW TABLE METADATA tableName [, tableName] ... |
查询表的元数据
| SHOW TABLE METADATA t_order
|
+| EXPORT DATABASE CONFIG [FROM database_name] [, file="file_path"] |
将 database 中的资源和规则配置导出为 YAML 格式
| EXPORT DATABASE CONFIG FROM readwrite_splitting_db
|
+| IMPORT DATABASE CONFIG FILE="file_path" |
将 YAML 中的配置导入到 database 中,仅支持对空库进行导入操作
| IMPORT DATABASE CONFIG FILE = "/xxx/config-sharding.yaml" |
+| SHOW RULES USED RESOURCE resourceName [from database] |
查询 database 中使用指定资源的规则
| SHOW RULES USED RESOURCE ds_0 FROM databaseName
|
## 注意事项
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
index aefdfba0a70..a5f4b8ffcc9 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
@@ -4,7 +4,7 @@ weight = 3
chapter = true
+++
-RAL (Resource & Rule Administration Language) responsible for the added-on
feature of hint, transaction type switch, scaling, sharding execute planning
and so on.
+RAL (Resource & Rule Administration Language) responsible for hint, circuit
breaker, configuration import and export, scaling control and other management
functions.
## Hint
@@ -56,22 +56,21 @@ RAL (Resource & Rule Administration Language) responsible
for the added-on featu
## Other
-| Statement |
Function
|
Example |
-|:-------------------------------------------------------------------------
|:-------------------------------------------------------------------------------------------------------------------------------------------------------
|:-------------------------------------------------- |
-| SHOW INSTANCE MODE |
Query the mode configuration of the proxy
| SHOW
INSTANCE MODE |
-| COUNT DATABASE RULES [FROM database] |
Query the number of rules in a database
| COUNT
DATABASE RULES |
-| SET VARIABLE proxy_property_name = xx |
proxy_property_name is one of [properties
configuration](/en/user-manual/shardingsphere-proxy/yaml-config/props/) of
proxy, name is split by underscore | SET VARIABLE sql_show = true
|
-| SET VARIABLE transaction_type = xx |
Modify transaction_type of the current connection, supports LOCAL, XA, BASE
| SET
VARIABLE transaction_type = XA |
-| SET VARIABLE agent_plugins_enabled = [TRUE / FALSE] |
Set whether the agent plugins are enabled, the default value is false
| SET
VARIABLE agent_plugins_enabled = TRUE |
-| SHOW ALL VARIABLES |
Query proxy all properties configuration
| SHOW
ALL VARIABLES |
-| SHOW VARIABLE variable_name |
Query proxy variable, name is split by underscore
| SHOW
VARIABLE sql_show |
-| PREVIEW SQL |
Preview the actual SQLs
|
PREVIEW SELECT * FROM t_order |
-| PARSE SQL |
Parse SQL and output abstract syntax tree
| PARSE
SELECT * FROM t_order |
-| REFRESH TABLE METADATA |
Refresh the metadata of all tables
|
REFRESH TABLE METADATA |
-| REFRESH TABLE METADATA [tableName / tableName FROM RESOURCE resourceName] |
Refresh the metadata of a table
|
REFRESH TABLE METADATA t_order FROM resource ds_1 |
-| SHOW TABLE METADATA tableName [, tableName] ... |
Query table metadata
| SHOW
TABLE METADATA t_order |
-| EXPORT DATABASE CONFIG [FROM database_name] [, file="file_path"] |
Query / export resources and rule configuration in database
|
EXPORT DATABASE CONFIG FROM readwrite_splitting_db |
-| SHOW RULES USED RESOURCE resourceName [from database] |
Query the rules for using the specified resource in database
| SHOW
RULES USED RESOURCE ds_0 FROM databaseName |
+| Statement |
Function
|
Example |
+|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------
|
+| SHOW INSTANCE MODE |
Query the mode configuration of the proxy
| SHOW
INSTANCE MODE |
+| COUNT DATABASE RULES [FROM database] |
Query the number of rules in a database
| COUNT
DATABASE RULES |
+| SET VARIABLE proxy_property_name = xx |
proxy_property_name is one of [properties
configuration](/en/user-manual/shardingsphere-proxy/yaml-config/props/) of
proxy, name is split by underscore | SET VARIABLE sql_show = true
|
+| SET VARIABLE transaction_type = xx |
Modify transaction_type of the current connection, supports LOCAL, XA, BASE
| SET
VARIABLE transaction_type = XA |
+| SET VARIABLE agent_plugins_enabled = [TRUE / FALSE] |
Set whether the agent plugins are enabled, the default value is false
| SET
VARIABLE agent_plugins_enabled = TRUE |
+| SHOW ALL VARIABLES |
Query proxy all properties configuration
| SHOW
ALL VARIABLES |
+| SHOW VARIABLE variable_name |
Query proxy variable, name is split by underscore
| SHOW
VARIABLE sql_show |
+| REFRESH TABLE METADATA |
Refresh the metadata of all tables
|
REFRESH TABLE METADATA |
+| REFRESH TABLE METADATA [tableName / tableName FROM RESOURCE resourceName] |
Refresh the metadata of a table
|
REFRESH TABLE METADATA t_order FROM resource ds_1 |
+| SHOW TABLE METADATA tableName [, tableName] ... |
Query table metadata
| SHOW
TABLE METADATA t_order |
+| EXPORT DATABASE CONFIG [FROM database_name] [, file="file_path"] |
Export resources and rule configurations to YAML format
|
EXPORT DATABASE CONFIG FROM readwrite_splitting_db |
+| IMPORT DATABASE CONFIG FILE="file_path" |
Import resources and rule configuration from YAML, only supports import into an
empty database |
IMPORT DATABASE CONFIG FILE = "/xxx/config-sharding.yaml" |
+| SHOW RULES USED RESOURCE resourceName [from database] |
Query the rules for using the specified resource in database
| SHOW
RULES USED RESOURCE ds_0 FROM databaseName |
## Notice
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.cn.md
new file mode 100644
index 00000000000..f71bcffd697
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.cn.md
@@ -0,0 +1,15 @@
++++
+title = "RUL 语法"
+weight = 4
+chapter = true
++++
+
+RUL (Resource Utility Language) 为 Apache ShardingSphere 的工具类语言,提供 SQL 解析、SQL
格式化、执行计划预览等功能。
+
+## SQL 工具
+
+| 语句 | 说明 | 示例 |
+|:--------------------|:-------------------------|:------------------------------|
+| PARSE SQL | 解析 SQL 并输出抽象语法树 | PARSE SELECT * FROM t_order |
+| FORMAT SQL | 解析并输出格式化后的 SQL 语句 | FORMAT SELECT * FROM t_order |
+| PREVIEW SQL | 预览 SQL 执行计划 | PREVIEW SELECT * FROM t_order |
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.en.md
new file mode 100644
index 00000000000..87211ebaf86
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rul/_index.en.md
@@ -0,0 +1,15 @@
++++
+title = "RUL Syntax"
+weight = 4
+chapter = true
++++
+
+RUL (Resource Utility Language) responsible for SQL parsing, SQL formatting,
preview execution plan and more utility functions.
+
+## SQL Utility
+
+| Statement | Function | Example
|
+|:------------|:----------------------------------------------|:------------------------------|
+| PARSE SQL | Parse SQL and output abstract syntax tree | PARSE SELECT *
FROM t_order |
+| FORMAT SQL | Parse SQL and output formated SQL statement | FORMAT SELECT
* FROM t_order |
+| PREVIEW SQL | Preview SQL execution plan | PREVIEW SELECT
* FROM t_order |