class ZebraShardingDefaultCfgFiller {

    public static void checkThenFill(ZebraShardingDataSourceCfg zebraShardingDataSourceCfg) {
        ZebraShardingRuleConfiguration zebraShardingRuleConfiguration = zebraShardingDataSourceCfg.getSharding();
        YamlShardingStrategyConfiguration defaultTableStrategy = zebraShardingRuleConfiguration.getDefaultTableStrategy();
        if (defaultTableStrategy == null) {
            // 没有配置则直接返回
            return;
        }

        YamlInlineShardingStrategyConfiguration defaultTableInline = defaultTableStrategy.getInline();
        fillDefaultInline(defaultTableInline);

        Map<String, YamlTableRuleConfiguration> tables = zebraShardingDataSourceCfg.getSharding().getTables();
        for (Map.Entry<String, YamlTableRuleConfiguration> tableEntry : tables.entrySet()) {
            YamlTableRuleConfiguration tableConfiguration = tableEntry.getValue();

            // 先支持table.inline默认配置补全
            fillInlineIfNotCfg(tableConfiguration, defaultTableInline);
        }
    }

}