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/08/30 07:26:18 UTC

[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #20648: Add convert read-write-splitting distsql and test case

TeslaCN commented on code in PR #20648:
URL: https://github.com/apache/shardingsphere/pull/20648#discussion_r958101654


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/queryable/ConvertYamlConfigurationHandler.java:
##########
@@ -279,4 +317,79 @@ private String getBindings(final Iterator<String> iterator) {
         result.append(DistSQLScriptConstants.SEMI).append(System.lineSeparator());
         return result.toString();
     }
+    
+    private void appendReadWriteSplittingRules(final Collection<YamlRuleConfiguration> rules, final StringBuilder stringBuilder) {
+        if (rules.isEmpty()) {
+            return;
+        }
+        stringBuilder.append(String.format(DistSQLScriptConstants.CREATE_READWRITE_SPLITTING_RULE));

Review Comment:
   Why use format here?



-- 
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