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 2021/09/03 06:06:51 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue #12189: Discuss, Do we need to refactor the ShardingSphereDataSource

zjcnb opened a new issue #12189:
URL: https://github.com/apache/shardingsphere/issues/12189


   Hi community,
   
      I found some code can be optimized, It 's about ```ShardingSphereDataSource```. For example:
   
   ```
   ShardingSphereDataSource.createContextManager(final String schemaName, final ModeConfiguration modeConfig)
   
   ShardingSphereDataSource.createContextManagercreateContextManager(final String schemaName, final ModeConfiguration modeConfig, final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigs, final Properties props)
   ```
   
   I think these two methods can be merge one method, We only need to make adjustments in the upper layer to be compatible.
   
   Even, I think the two of them can be merged if we do not consider users to directly create ShardingSphereDataSource
   
   
   ```
   ShardingSphereDataSource(final String schemaName, final ModeConfiguration modeConfig)
   
   ShardingSphereDataSource(final String schemaName, final ModeConfiguration modeConfig, final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> ruleConfigs, final Properties props)
   ```
   
   
   
   


-- 
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] menghaoranss commented on issue #12189: Discuss, Do we need to refactor the ShardingSphereDataSource

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #12189:
URL: https://github.com/apache/shardingsphere/issues/12189#issuecomment-912293492


   I suggest keeping the 2 construction methods of `ShardingSphereDataSource`, and you can try to merge  `createContextManager`.


-- 
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] menghaoranss closed issue #12189: Discuss, Do we need to refactor the ShardingSphereDataSource

Posted by GitBox <gi...@apache.org>.
menghaoranss closed issue #12189:
URL: https://github.com/apache/shardingsphere/issues/12189


   


-- 
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] zjcnb commented on issue #12189: Discuss, Do we need to refactor the ShardingSphereDataSource

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12189:
URL: https://github.com/apache/shardingsphere/issues/12189#issuecomment-912453094


   > I suggest keeping the 2 construction methods of `ShardingSphereDataSource`, and you can try to merge `createContextManager`.
   
   Yeah, I will merge createContextManager


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