use of io.shardingjdbc.core.yaml.sharding.strategy.YamlComplexShardingStrategyConfiguration in project sharding-jdbc by shardingjdbc.
the class YamlShardingStrategyConfigurationTest method createComplexShardingStrategyConfig.
private YamlShardingStrategyConfiguration createComplexShardingStrategyConfig() {
YamlComplexShardingStrategyConfiguration complexShardingStrategyConfig = new YamlComplexShardingStrategyConfiguration();
complexShardingStrategyConfig.setShardingColumns("user_id, order_id");
complexShardingStrategyConfig.setAlgorithmClassName(ComplexOrderShardingAlgorithm.class.getName());
YamlShardingStrategyConfiguration result = new YamlShardingStrategyConfiguration();
result.setComplex(complexShardingStrategyConfig);
return result;
}
Aggregations