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/03/05 13:34:01 UTC

[GitHub] [incubator-shardingsphere] yuwei5380 opened a new issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

yuwei5380 opened a new issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622
 
 
   eg:
   create table aaa (
   no  int,
   id   varchar2(10)
   );
   if  we need columns 'no' and 'id', how to write the code? 
   
   

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

[GitHub] [incubator-shardingsphere] geomonlin commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

Posted by GitBox <gi...@apache.org>.
geomonlin commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622#issuecomment-595593095
 
 
   About Configuration description, you can see [Configuration Item Explanation](https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-yaml/#configuration-item-explanation). Maybe this a similar example,you can [read ](https://www.cnblogs.com/rinack/p/11241111.html).

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

[GitHub] [incubator-shardingsphere] kimmking commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622#issuecomment-595599758
 
 
   As @geomonlin referred:
   At first config no and id in your config file:
   > complex: #Complex sharding scenario for multiple sharding columns
               shardingColumns: #Names of sharding columns. Multiple columns separated with comma
               algorithmClassName: #Complex sharding algorithm class name. This class need to implements ComplexKeysShardingAlgorithm, and require a no argument constructor
   
   And then, write a class  implements ComplexKeysShardingAlgorithm, the two colunms will retrieved in the second parameter of doSharding method.
   

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

[GitHub] [incubator-shardingsphere] terrymanu closed issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622
 
 
   

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

[GitHub] [incubator-shardingsphere] kimmking commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622#issuecomment-596857712
 
 
   @yuwei5380 shall we close this issue?

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

[GitHub] [incubator-shardingsphere] yuwei5380 commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?

Posted by GitBox <gi...@apache.org>.
yuwei5380 commented on issue #4622: ComplexKeysShardingAlgorithm support different types of columns?
URL: https://github.com/apache/incubator-shardingsphere/issues/4622#issuecomment-607576046
 
 
   ComplexKeysShardingAlgorithm<String>, but The two columns are of different types

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