You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/25 03:47:41 UTC

[GitHub] [shardingsphere] isHuangXin commented on a diff in pull request #19509: CREATE SHARDING TABLE RULE

isHuangXin commented on code in PR #19509:
URL: https://github.com/apache/shardingsphere/pull/19509#discussion_r928432444


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/constant/DistSQLScriptConstants.java:
##########
@@ -63,4 +63,31 @@ public final class DistSQLScriptConstants {
             + ")";
     
     public static final String PROPERTY = "\"%s\"=\"%s\"";
+
+    public static final String CREATE_SHARDING_ALGORITHM = "CREATE SHARDING ALGORITHM";
+
+    public static final String SHARDING_ALGORITHM = " %s ("
+            + System.lineSeparator()
+            + "TYPE(NAME=%s, PROPERTIES(%s))"
+            + System.lineSeparator()
+            + ")";
+
+    public static final String CREATE_SHARDING_TABLE = "CREATE SHARDING TABLE RULE";
+
+    public static final String SHARDING_TABLE = " %s ("
+            + System.lineSeparator()
+            + "DATANODES(\"%s\"),"
+            + System.lineSeparator()
+            + "%s"
+            + System.lineSeparator()
+            + ")";
+
+    public static final String DATABASE_SHARDING_STRATEGY = "DATABASE_STRATEGY(TYPE=standard, SHARDING_COLUMN=%s, SHARDING_ALGORITHM=%s),"

Review Comment:
   > TYPE is not fixed as `standard`, please get it from configuration.
   
   Fixed !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org