Skip to content

Commit

Permalink
Add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 30, 2023
1 parent 298b56f commit 2d6600a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ public static Map<String, ShardingSphereSchema> build(final Collection<String> t
}

private static Collection<String> getAllTableNames(final Collection<ShardingSphereRule> rules) {
log.error("======getAllTableNames rules======" + rules);
for (ShardingSphereRule each : rules) {
log.error("======getAllTableNames each======" + each.getClass().getName());
if (TableContainedRule.class.isInstance(each)) {
log.error("======getAllTableNames getLogicTableMapper======" + ((TableContainedRule) each).getLogicTableMapper());
log.error("======getAllTableNames getLogicTableMapper.getTableNames======" + ((TableContainedRule) each).getLogicTableMapper().getTableNames());
}
}
return rules.stream().filter(TableContainedRule.class::isInstance).flatMap(each -> ((TableContainedRule) each).getLogicTableMapper().getTableNames().stream()).collect(Collectors.toSet());
}

Expand Down

0 comments on commit 2d6600a

Please sign in to comment.