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 2019/05/30 00:54:34 UTC

[GitHub] [incubator-shardingsphere] zhouchangjiang commented on issue #2466: The influence of different configurations of data-masking/encrypt on show-SQL

zhouchangjiang commented on issue #2466: The influence of different configurations of data-masking/encrypt on show-SQL
URL: https://github.com/apache/incubator-shardingsphere/issues/2466#issuecomment-497160449
 
 
   Hi @terrymanu
   I will try it, This is my preliminary idea.
   1,Refactoring the constructor of [EncryptDataSource ](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/EncryptDataSource.java) and add java.util.Properties parameters, similar to [MasterSlaveDataSource](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/MasterSlaveDataSource.java);
   2,Refactoring the createDataSource method of [EncryptDataSourceFactory ](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/EncryptDataSourceFactory.java) and add java.util. Properties parameters,similar to [MasterSlaveDataSourceFactory](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/MasterSlaveDataSourceFactory.java);
   3,Refactoring the constructor of  and add  ShardingProperties parameters;
   4,Modify the getSQLUnit method of [EncryptPreparedStatement ](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/EncryptPreparedStatement.java) to print the rewritten SQL log according to configuration information;
   5,Modify the getRewriteSQL method of [EncryptStatement ](https://github.com/apache/incubator-shardingsphere/blob/dev/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/EncryptStatement.java) to print therewritten SQL log according to configuration information;

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