You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/05/26 02:27:02 UTC

[shardingsphere] branch master updated: Database discovery type support `string`. (#17782)

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

jianglongtao 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 b61aca0aa50 Database discovery type support `string`. (#17782)
b61aca0aa50 is described below

commit b61aca0aa50d82146660282490ed4f26d8c9665d
Author: lanchengx <52...@users.noreply.github.com>
AuthorDate: Thu May 26 10:26:55 2022 +0800

    Database discovery type support `string`. (#17782)
    
    * Discovery type supports `STRING`.
    
    * Update doc.
---
 .../distsql/syntax/rdl/rule-definition/db-discovery.cn.md         | 8 ++++----
 .../distsql/syntax/rdl/rule-definition/db-discovery.en.md         | 8 ++++----
 .../src/main/antlr4/imports/db-discovery/RDLStatement.g4          | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.cn.md
index 656a8e7f3d5..ed6fa39950a 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.cn.md
@@ -68,13 +68,13 @@ property:
 ```sql
 CREATE DB_DISCOVERY RULE db_discovery_group_0 (
 RESOURCES(ds_0, ds_1, ds_2),
-TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='92504d5b-6dec')),
+TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
 HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
 );
 
 ALTER DB_DISCOVERY RULE db_discovery_group_0 (
 RESOURCES(ds_0, ds_1, ds_2),
-TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='246e9612-aaf1')),
+TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='246e9612-aaf1')),
 HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
 );
 
@@ -90,7 +90,7 @@ DROP DB_DISCOVERY HEARTBEAT db_discovery_group_0_heartbeat;
 
 ```sql
 CREATE DB_DISCOVERY TYPE db_discovery_group_1_mgr(
-  TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='92504d5b-6dec'))
+  TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec'))
 );
 
 CREATE DB_DISCOVERY HEARTBEAT db_discovery_group_1_heartbeat(
@@ -104,7 +104,7 @@ HEARTBEAT=db_discovery_group_1_heartbeat
 );
 
 ALTER DB_DISCOVERY TYPE db_discovery_group_1_mgr(
-  TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='246e9612-aaf1'))
+  TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='246e9612-aaf1'))
 );
 
 ALTER DB_DISCOVERY HEARTBEAT db_discovery_group_1_heartbeat(
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.en.md
index 3ba25b52bc9..f65dddc928b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery.en.md
@@ -69,13 +69,13 @@ property:
 ```sql
 CREATE DB_DISCOVERY RULE db_discovery_group_0 (
 RESOURCES(ds_0, ds_1, ds_2),
-TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='92504d5b-6dec')),
+TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
 HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
 );
 
 ALTER DB_DISCOVERY RULE db_discovery_group_0 (
 RESOURCES(ds_0, ds_1, ds_2),
-TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='246e9612-aaf1')),
+TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='246e9612-aaf1')),
 HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
 );
 
@@ -91,7 +91,7 @@ DROP DB_DISCOVERY HEARTBEAT db_discovery_group_0_heartbeat;
 
 ```sql
 CREATE DB_DISCOVERY TYPE db_discovery_group_1_mgr(
-  TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='92504d5b-6dec'))
+  TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec'))
 );
 
 CREATE DB_DISCOVERY HEARTBEAT db_discovery_group_1_heartbeat(
@@ -105,7 +105,7 @@ HEARTBEAT=db_discovery_group_1_heartbeat
 );
 
 ALTER DB_DISCOVERY TYPE db_discovery_group_1_mgr(
-  TYPE(NAME=MySQL.MGR,PROPERTIES('group-name'='246e9612-aaf1'))
+  TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='246e9612-aaf1'))
 );
 
 ALTER DB_DISCOVERY HEARTBEAT db_discovery_group_1_heartbeat(
diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-parser/src/main/antlr4/imports/db-discovery/RDLStatement.g4 b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-parser/src/main/antlr4/imports/db-discovery/RDLStatement.g4
index c148c4d2dbe..51215267d3f 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-parser/src/main/antlr4/imports/db-discovery/RDLStatement.g4
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-parser/src/main/antlr4/imports/db-discovery/RDLStatement.g4
@@ -104,7 +104,7 @@ property
     ;
 
 discoveryTypeName
-    : IDENTIFIER
+    : IDENTIFIER | STRING
     ;
 
 discoveryHeartbeatName