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/01/26 11:22:34 UTC

[GitHub] [shardingsphere] tuichenchuxin opened a new pull request #15095: Support config encrypt column data type for creating

tuichenchuxin opened a new pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095


   Ref #14987.
   
   Changes proposed in this pull request:
   - Support config encrypt column data type for creating


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



[GitHub] [shardingsphere] tuichenchuxin commented on pull request #15095: Support config encrypt column data type for creating

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095#issuecomment-1022875331


   > @tuichenchuxin Please solve code conflict first.
   
   Ok. Done.


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



[GitHub] [shardingsphere] tuichenchuxin commented on a change in pull request #15095: Support config encrypt column data type for creating

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on a change in pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095#discussion_r793247742



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptCreateTableTokenGenerator.java
##########
@@ -73,23 +75,66 @@ protected boolean isGenerateSQLTokenForEncrypt(final SQLStatementContext sqlStat
         return result;
     }
     
-    private SubstitutableColumnNameToken getCipherColumnToken(final String tableName, final String columnName, final ColumnDefinitionSegment column, final int stopIndex) {
-        return new SubstitutableColumnNameToken(stopIndex + 1, column.getColumnName().getStopIndex(), 
+    private SQLToken getCipherColumnToken(final String tableName, final String columnName, final ColumnDefinitionSegment column, final int stopIndex) {

Review comment:
       @strongduanmu Because when config dataType then will return `EncryptConfigDataTypeToken` , not `SubstitutableColumnNameToken` again.




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



[GitHub] [shardingsphere] strongduanmu merged pull request #15095: Support config encrypt column data type for creating

Posted by GitBox <gi...@apache.org>.
strongduanmu merged pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095


   


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



[GitHub] [shardingsphere] tuichenchuxin edited a comment on pull request #15095: Support config encrypt column data type for creating

Posted by GitBox <gi...@apache.org>.
tuichenchuxin edited a comment on pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095#issuecomment-1022875331


   > @tuichenchuxin Please solve code conflict first.
   > Please add unit test for this pr.
   
   Ok. Done.


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



[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #15095: Support config encrypt column data type for creating

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #15095:
URL: https://github.com/apache/shardingsphere/pull/15095#discussion_r793182600



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptCreateTableTokenGenerator.java
##########
@@ -73,23 +75,66 @@ protected boolean isGenerateSQLTokenForEncrypt(final SQLStatementContext sqlStat
         return result;
     }
     
-    private SubstitutableColumnNameToken getCipherColumnToken(final String tableName, final String columnName, final ColumnDefinitionSegment column, final int stopIndex) {
-        return new SubstitutableColumnNameToken(stopIndex + 1, column.getColumnName().getStopIndex(), 
+    private SQLToken getCipherColumnToken(final String tableName, final String columnName, final ColumnDefinitionSegment column, final int stopIndex) {

Review comment:
       @tuichenchuxin Why change return type to SQLToken?




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