shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Default setting for KeyGenerator ColumnName and algorithm

Open rimal opened this issue 7 years ago • 4 comments

Question

In my application, I am only doing database level sharding. There is no table level sharding. So, only setting the DefaultDatabaseShardingStrategyConfig works fine. But, if I want to use snowflake for key generation for my tables, I need to add TableRuleConfiguration for all my tables to specify the algorithm and the column name.

Is there anyway to set a default key generation config as well?

rimal avatar Sep 12 '19 10:09 rimal

@terrymanu is there any current setting for this?

rimal avatar Sep 16 '19 08:09 rimal

You can see the official documents carefully. There are detailed descriptions e.g:defaultKeyGenerator、keyGenerator https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/configuration/config-yaml/

geomonlin avatar Sep 17 '19 11:09 geomonlin

@geomonlin Thanks for your reply. I found the setting in the doc but actually I am looking for a way in io.shardingsphere v3.1.0 . My bad, I should have mentioned this earlier.

rimal avatar Sep 17 '19 11:09 rimal

@geomonlin Thanks for your reply. I found the setting in the doc but actually I am looking for a way in io.shardingsphere v3.1.0 . My bad, I should have mentioned this earlier.

This is the official website. https://shardingsphere.apache.org/

geomonlin avatar Sep 17 '19 12:09 geomonlin