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 025629acfab refactor readwrite sql parser doc (#20354)
025629acfab is described below
commit 025629acfab11e2f53c1eeb5a65f9b1803fc968d
Author: Chuxin Chen <[email protected]>
AuthorDate: Mon Aug 22 15:59:43 2022 +0800
refactor readwrite sql parser doc (#20354)
---
.../content/dev-manual/readwrite-splitting.cn.md | 38 +++++++--------
docs/document/content/dev-manual/sql-parser.cn.md | 55 +++++++++++++---------
docs/document/content/dev-manual/sql-parser.en.md | 6 +++
3 files changed, 57 insertions(+), 42 deletions(-)
diff --git a/docs/document/content/dev-manual/readwrite-splitting.cn.md
b/docs/document/content/dev-manual/readwrite-splitting.cn.md
index 3dc07175a92..b916c5d2ce7 100644
--- a/docs/document/content/dev-manual/readwrite-splitting.cn.md
+++ b/docs/document/content/dev-manual/readwrite-splitting.cn.md
@@ -5,27 +5,27 @@ weight = 8
chapter = true
+++
-## SPI 接口
+## ReadQueryLoadBalanceAlgorithm
-### ReadQueryLoadBalanceAlgorithm
+### 全限定类名
-| *SPI 名称* | *详细说明* |
-| ----------------------------------------- | ----------------------- |
-| ReadQueryLoadBalanceAlgorithm | 读库负载均衡算法 |
+[`org.apache.shardingsphere.readwritesplitting.spi.ReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-api/src/main/java/org/apache/shardingsphere/readwritesplitting/spi/ReadQueryLoadBalanceAlgorithm.java)
-## 示例
+### 定义
-### ReadQueryLoadBalanceAlgorithm
+读库负载均衡算法
-| *已知实现类* | *详细说明*
|
-|-----------------------------------------------------|----------------------------------------------------|
-| RoundRobinReadQueryLoadBalanceAlgorithm | 基于轮询的读库负载均衡算法
|
-| RandomReadQueryLoadBalanceAlgorithm | 基于随机的读库负载均衡算法
|
-| WeightReadQueryLoadBalanceAlgorithm | 基于权重的读库负载均衡算法
|
-| TransactionRandomReadQueryLoadBalanceAlgorithm |
无论是否在事务中,读请求采用随机策略路由到多个读库 |
-| TransactionRoundRobinReadQueryLoadBalanceAlgorithm |
无论是否在事务中,读请求采用轮询策略路由到多个读库 |
-| TransactionWeightReadQueryLoadBalanceAlgorithm |
无论是否在事务中,读请求采用权重策略路由到多个读库 |
-| FixedReplicaRandomReadQueryLoadBalanceAlgorithm |
显示开启事务,读请求采用随机策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
-| FixedReplicaRoundRobinReadQueryLoadBalanceAlgorithm |
显示开启事务,读请求采用轮询策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
-| FixedReplicaWeightReadQueryLoadBalanceAlgorithm |
显示开启事务,读请求采用权重策略路由到多个读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
-| FixedPrimaryReadQueryLoadBalanceAlgorithm | 读请求全部路由到主库
|
+### 已知实现
+
+| *配置标识* | *详细说明*
| *全限定类名*
|
+| ----------------------------- |
----------------------------------------------------------------------------------
| ---------------------------------------------------------- |
+| ROUND_ROBIN | 基于轮询的读库负载均衡算法
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RoundRobinReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/RoundRobinReadQueryLoadBalanceAlgorit
[...]
+| RANDOM | 基于随机的读库负载均衡算法
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.RandomReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/RandomReadQueryLoadBalanceAlgorithm.java)
|
+| WEIGHT | 基于权重的读库负载均衡算法
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.WeightReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java)
[...]
+| TRANSACTION_RANDOM | 无论是否在事务中,读请求采用随机策略路由到多个读库
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRandomReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/TransactionRandomReadQueryLoadBalance
[...]
+| TRANSACTION_ROUND_ROBIN | 无论是否在事务中,读请求采用轮询策略路由到多个读库
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionRoundRobinReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/TransactionRoundRobinReadQueryLoa
[...]
+| TRANSACTION_WEIGHT | 无论是否在事务中,读请求采用权重策略路由到多个读库
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.TransactionWeightReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/TransactionWeightReadQueryLoadBalance
[...]
+| FIXED_REPLICA_RANDOM |
显示开启事务,读请求采用随机策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRandomReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/FixedReplicaRandomReadQueryLoadBalanceAlgorithm.java)
|
+| FIXED_REPLICA_ROUND_ROBIN |
显示开启事务,读请求采用轮询策略路由到一个固定读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaRoundRobinReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/FixedReplicaRoundRobinReadQueryLoadBalanceAlgor
[...]
+| FIXED_REPLICA_WEIGHT |
显示开启事务,读请求采用权重策略路由到多个读库;不开事务,每次读流量使用指定算法路由到不同的读库 |
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedReplicaWeightReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/FixedReplicaWeightReadQueryLoadBalanceAlgorithm.java)
|
+| FIXED_PRIMARY | 读请求全部路由到主库
|
[`org.apache.shardingsphere.readwritesplitting.algorithm.loadbalance.FixedPrimaryReadQueryLoadBalanceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/FixedPrimaryReadQueryLoadBalance
[...]
diff --git a/docs/document/content/dev-manual/sql-parser.cn.md
b/docs/document/content/dev-manual/sql-parser.cn.md
index 250a753c6fc..987a57a1cf7 100644
--- a/docs/document/content/dev-manual/sql-parser.cn.md
+++ b/docs/document/content/dev-manual/sql-parser.cn.md
@@ -5,35 +5,44 @@ weight = 5
chapter = true
+++
-## SPI 接口
+## DatabaseTypedSQLParserFacade
-### DatabaseTypedSQLParserFacade
+### 全限定类名
-| *SPI 名称* | *详细说明* |
-| ---------------------------- | ----------------------------------- |
-| DatabaseTypedSQLParserFacade | 配置用于 SQL 解析的词法分析器和语法分析器入口 |
+[`org.apache.shardingsphere.sql.parser.spi.DatabaseTypedSQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-spi/src/main/java/org/apache/shardingsphere/sql/parser/spi/DatabaseTypedSQLParserFacade.java)
-### SQLVisitorFacade
+### 定义
-| *SPI 名称* | *详细说明*
|
-| ----------------------------------- |
------------------------------------------ |
-| SQLVisitorFacade | SQL 语法树访问器入口 |
+配置用于 SQL 解析的词法分析器和语法分析器入口
-## 示例
+### 已知实现
-### DatabaseTypedSQLParserFacade
+| *配置标识* | *详细说明* | *全限定类名*
|
+| ---------------------- | ------------------------ |
---------------------------------------------------------- |
+| MySQL | 基于 MySQL 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.mysql.parser.MySQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/parser/MySQLParserFacade.java)
|
+| PostgreSQL | 基于 PostgreSQL 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.postgresql.parser.PostgreSQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/parser/PostgreSQLParserFacade.java)
|
+| SQLServer | 基于 SQLServer 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.sqlserver.parser.SQLServerParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/parser/SQLServerParserFacade.java)
|
+| Oracle | 基于 Oracle 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.oracle.parser.OracleParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/parser/OracleParserFacade.java)
|
+| SQL92 | 基于 SQL92 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.sql92.parser.SQL92ParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/parser/SQL92ParserFacade.java)
|
+| openGauss | 基于 openGauss 的 SQL 解析器入口 |
[`org.apache.shardingsphere.sql.parser.opengauss.parser.OpenGaussParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/parser/OpenGaussParserFacade.java)
|
-| *Implementation Class* | *Description* |
-| ---------------------- |--------------------------|
-| MySQLParserFacade | 基于 MySQL 的 SQL 解析器入口 |
-| PostgreSQLParserFacade | 基于 PostgreSQL 的 SQL 解析器入口 |
-| SQLServerParserFacade | 基于 SQLServer 的 SQL 解析器入口 |
-| OracleParserFacade | 基于 Oracle 的 SQL 解析器入口 |
-| SQL92ParserFacade | 基于 SQL92 的 SQL 解析器入口 |
-| OpenGaussParserFacade | 基于 openGauss 的 SQL 解析器入口 |
+## SQLVisitorFacade
-### SQLVisitorFacade
+### 全限定类名
-| *SPI 名称* | *详细说明*
|
-| ----------------------------------- |
------------------------------------------ |
-| SQLVisitorFacade | SQL 语法树访问器入口 |
+[`org.apache.shardingsphere.sql.parser.spi.SQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-spi/src/main/java/org/apache/shardingsphere/sql/parser/spi/SQLVisitorFacade.java)
+
+### 定义
+
+SQL 语法树访问器入口
+
+### 已知实现
+
+| *配置标识* | *详细说明* | *全限定类名*
|
+| ---------------------- | ------------------------ |
---------------------------------------------------------- |
+| MySQL | 基于 MySQL 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.mysql.visitor.statement.facade.MySQLStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/facade/MySQLStatementSQLVisitorFacade.java)
|
+| PostgreSQL | 基于 PostgreSQL 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.facade.PostgreSQLStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/facade/PostgreSQLStatementSQLVisitorFacade.java)
|
+| SQLServer | 基于 SQLServer 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.sqlserver.visitor.statement.facade.SQLServerStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/facade/SQLServerStatementSQLVisitorFacade.java)
|
+| Oracle | 基于 Oracle 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.oracle.visitor.statement.facade.OracleStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/facade/OracleStatementSQLVisitorFacade.java)
|
+| SQL92 | 基于 SQL92 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.sql92.visitor.statement.facade.SQL92StatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/facade/SQL92StatementSQLVisitorFacade.java)
|
+| openGauss | 基于 openGauss 的 SQL 语法树访问器入口 |
[`org.apache.shardingsphere.sql.parser.opengauss.visitor.statement.facade.OpenGaussStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/facade/OpenGaussStatementSQLVisitorFacade.java)
|
diff --git a/docs/document/content/dev-manual/sql-parser.en.md
b/docs/document/content/dev-manual/sql-parser.en.md
index 2a8a258167f..4457ce5c0a3 100644
--- a/docs/document/content/dev-manual/sql-parser.en.md
+++ b/docs/document/content/dev-manual/sql-parser.en.md
@@ -40,3 +40,9 @@ SQL visitor facade class definition
| *Configuration Type* | *Description* |
*Fully-qualified class name* |
| -------------------- | ----------------------------------------- |
---------------------------- |
+| MySQL | MySQL syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.mysql.visitor.statement.facade.MySQLStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/facade/MySQLStatementSQLVisitorFacade.java)
|
+| PostgreSQL | PostgreSQL syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.postgresql.visitor.statement.facade.PostgreSQLStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/facade/PostgreSQLStatementSQLVisitorFacade.java)
|
+| SQLServer | SQLServer syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.sqlserver.visitor.statement.facade.SQLServerStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/statement/facade/SQLServerStatementSQLVisitorFacade.java)
|
+| Oracle | Oracle syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.oracle.visitor.statement.facade.OracleStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/facade/OracleStatementSQLVisitorFacade.java)
|
+| SQL92 | SQL92 syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.sql92.visitor.statement.facade.SQL92StatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/visitor/statement/facade/SQL92StatementSQLVisitorFacade.java)
|
+| openGauss | openGauss syntax tree visitor entry |
[`org.apache.shardingsphere.sql.parser.opengauss.visitor.statement.facade.OpenGaussStatementSQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/facade/OpenGaussStatementSQLVisitorFacade.java)
|