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 2020/01/08 08:52:29 UTC

[GitHub] [incubator-shardingsphere] KomachiSion commented on a change in pull request #3899: Sharding scaling

KomachiSion commented on a change in pull request #3899: Sharding scaling
URL: https://github.com/apache/incubator-shardingsphere/pull/3899#discussion_r364119116
 
 

 ##########
 File path: sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/writer/SqlBuilder.java
 ##########
 @@ -66,6 +66,23 @@ public String load(final String key) {
                     }
                 });
     }
+    
+    private void initIdentifierQuoteString(final String databaseType) {
+        switch (databaseType) {
+            case "MySQL":
+                leftIdentifierQuoteString = "`";
+                rightIdentifierQuoteString = "`";
+                break;
+            case "PostgreSQL":
+                leftIdentifierQuoteString = "\"";
+                rightIdentifierQuoteString = "\"";
+                break;
+            default:
+                leftIdentifierQuoteString = "";
+                rightIdentifierQuoteString = "";
+                break;
+        }
+    }
 
 Review comment:
   Similar problem as AbstractJdbcReader.
   This can abstract a protect method, and let subClass to implement.
   
   Or create a new interface to handle this situation.
   each type database has implement, SQLBuilder only call interface.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services