This is an automated email from the ASF dual-hosted git repository.

zhaojinchao 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 b2013c87960 Update doc for register storage unit (#31978)
b2013c87960 is described below

commit b2013c87960338b82f6d019a6c6b84cfd6a7788e
Author: Raigor <[email protected]>
AuthorDate: Thu Jul 4 16:11:15 2024 +0800

    Update doc for register storage unit (#31978)
---
 .../register-storage-unit.cn.md                       | 15 +++++++--------
 .../register-storage-unit.en.md                       | 19 +++++++++----------
 .../distsql/segment/DataSourceSegment.java            |  2 +-
 3 files changed, 17 insertions(+), 19 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.cn.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.cn.md
index 0bd9c2abdba..85723ee7ef7 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.cn.md
@@ -64,12 +64,11 @@ value ::=
 - `storageUnitName` 区分大小写;
 - `storageUnitName` 在当前逻辑库中需要唯一;
 - `storageUnitName` 命名只允许使用字母、数字以及 `_` ,且必须以字母开头;
-- `poolProperty` 用于自定义连接池参数,`key` 必须和连接池参数名一致;
-- `ifNotExists` 子句用于避免出现 `Duplicate storage unit` 的错误。
+- `PROPERTIES` 为可选参数,用于自定义连接池属性,`key` 必须和连接池参数名一致。
 
 ### 示例
 
-- 使用标准模式注册存储单元
+- 使用 HOST & PORT 方式注册存储单元
 
 ```sql
 REGISTER STORAGE UNIT ds_0 (
@@ -81,10 +80,10 @@ REGISTER STORAGE UNIT ds_0 (
 );
 ```
 
-- 使用标准模式注册存储单元并设置连接池参数
+- 使用 HOST & PORT 方式注册存储单元并设置连接池属性
 
 ```sql
-REGISTER STORAGE UNIT ds_0 (
+REGISTER STORAGE UNIT ds_1 (
     HOST="127.0.0.1",
     PORT=3306,
     DB="db_1",
@@ -94,11 +93,11 @@ REGISTER STORAGE UNIT ds_0 (
 );
 ```
 
-- 使用 URL 模式注册存储单元并设置连接池参数
+- 使用 URL 方式注册存储单元并设置连接池属性
 
 ```sql
-REGISTER STORAGE UNIT ds_0 (
-    URL="jdbc:mysql://127.0.0.1:3306/db_2?serverTimezone=UTC&useSSL=false",
+REGISTER STORAGE UNIT ds_2 (
+    
URL="jdbc:mysql://127.0.0.1:3306/db_2?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
     USER="root",
     PASSWORD="root",
     PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000")
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.en.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.en.md
index 1281c5e791c..369ac975566 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/register-storage-unit.en.md
@@ -65,28 +65,27 @@ value ::=
 - `storageUnitName` is case-sensitive;
 - `storageUnitName` needs to be unique within the current database;
 - `storageUnitName` name only allows letters, numbers and `_`, and must start 
with a letter;
-- `poolProperty` is used to customize connection pool parameters, `key` must 
be the same as the connection pool
-  parameter name;
-- `ifNotExists` clause is used for avoid `Duplicate storage unit` error.
+- `PROPERTIES` is optional, used to customize connection pool properties, 
`key` must be the same as the connection pool
+  property name.
 
 ### Example
 
-- Register storage unit using standard mode
+- Register storage unit using HOST & PORT method
 
 ```sql
 REGISTER STORAGE UNIT ds_0 (
     HOST="127.0.0.1",
     PORT=3306,
-    DB="db_1",
+    DB="db_0",
     USER="root",
     PASSWORD="root"
 );
 ```
 
-- Register storage unit and set connection pool parameters using standard mode
+- Register storage unit and set connection pool properties using HOST & PORT 
method
 
 ```sql
-REGISTER STORAGE UNIT ds_0 (
+REGISTER STORAGE UNIT ds_1 (
     HOST="127.0.0.1",
     PORT=3306,
     DB="db_1",
@@ -96,11 +95,11 @@ REGISTER STORAGE UNIT ds_0 (
 );
 ```
 
-- Register storage unit and set connection pool parameters using URL patterns
+- Register storage unit and set connection pool properties using URL method
 
 ```sql
-REGISTER STORAGE UNIT ds_0 (
-    URL="jdbc:mysql://127.0.0.1:3306/db_2?serverTimezone=UTC&useSSL=false",
+REGISTER STORAGE UNIT ds_2 (
+    
URL="jdbc:mysql://127.0.0.1:3306/db_2?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
     USER="root",
     PASSWORD="root",
     PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000")
diff --git 
a/parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/segment/DataSourceSegment.java
 
b/parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/segment/DataSourceSegment.java
index 58776b25e8d..492658b21ec 100644
--- 
a/parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/segment/DataSourceSegment.java
+++ 
b/parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/segment/DataSourceSegment.java
@@ -27,7 +27,7 @@ import java.util.Properties;
  */
 @RequiredArgsConstructor
 @Getter
-public class DataSourceSegment implements DistSQLSegment {
+public abstract class DataSourceSegment implements DistSQLSegment {
     
     private final String name;
     

Reply via email to