You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2024/04/09 12:19:51 UTC

(shardingsphere) branch master updated: Adjust outdated PARSE ENGINE documents. (#30822)

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 ec3b47f9956 Adjust outdated PARSE ENGINE documents. (#30822)
ec3b47f9956 is described below

commit ec3b47f9956e40373f0c02ccac582cbdda4a1550
Author: LotusMoon <ch...@aliyun.com>
AuthorDate: Tue Apr 9 20:19:45 2024 +0800

    Adjust outdated PARSE ENGINE documents. (#30822)
---
 docs/document/content/reference/sharding/parse.cn.md | 7 ++++---
 docs/document/content/reference/sharding/parse.en.md | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/docs/document/content/reference/sharding/parse.cn.md b/docs/document/content/reference/sharding/parse.cn.md
index 8c56b9dd5ed..8a380c7e2db 100644
--- a/docs/document/content/reference/sharding/parse.cn.md
+++ b/docs/document/content/reference/sharding/parse.cn.md
@@ -67,13 +67,13 @@ ShardingSphere 的 SQL 解析器经历了 3 代产品的更新迭代。
 ```xml
 <dependency>
     <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-parser-engine</artifactId>
+    <artifactId>shardingsphere-parser-sql-engine</artifactId>
     <version>${project.version}</version>
 </dependency>
 <!-- 根据需要引入指定方言的解析模块(以 MySQL 为例),可以添加所有支持的方言,也可以只添加使用到的 -->
 <dependency>
     <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-parser-mysql</artifactId>
+    <artifactId>shardingsphere-parser-sql-mysql</artifactId>
     <version>${project.version}</version>
 </dependency>
 ```
@@ -99,7 +99,8 @@ SQLStatement sqlStatement = sqlVisitorEngine.visit(parseASTNode);
 - SQL 格式化
 
 ```java
-new SQLFormatEngine(databaseType, cacheOption).format(sql, useCache, props);
+new SQLFormatEngine(TypedSPILoader.getService(DatabaseType.class, "Mysql"), cacheOption)
+        .format(sql, false, null);
 ```
 
 例子:
diff --git a/docs/document/content/reference/sharding/parse.en.md b/docs/document/content/reference/sharding/parse.en.md
index 2e99cb655ca..c6321c499fb 100644
--- a/docs/document/content/reference/sharding/parse.en.md
+++ b/docs/document/content/reference/sharding/parse.en.md
@@ -64,13 +64,13 @@ Since V5.0.x, the architecture of the parsing engine has been restructured and a
 ```xml
 <dependency>
     <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-parser-engine</artifactId>
+    <artifactId>shardingsphere-parser-sql-engine</artifactId>
     <version>${project.version}</version>
 </dependency>
 <!-- According to the needs, introduce the parsing module of the specified dialect (take MySQL as an example), you can add all the supported dialects, or just what you need -->
 <dependency>
     <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-parser-mysql</artifactId>
+    <artifactId>shardingsphere-parser-sql-mysql</artifactId>
     <version>${project.version}</version>
 </dependency>
 ```
@@ -96,7 +96,8 @@ SQLStatement sqlStatement = sqlVisitorEngine.visit(parseASTNode);
 - SQL Formatting
 
 ```java
-new SQLFormatEngine(databaseType, cacheOption).format(sql, useCache, props);
+new SQLFormatEngine(TypedSPILoader.getService(DatabaseType.class, "Mysql"), cacheOption)
+        .format(sql, false, null);
 ```
 
 Example: