|
@ -40,6 +40,7 @@ public class JdbcTableMetaRepository implements TableMetaRepository { |
|
|
String databaseName = condition.getDatabaseName(); |
|
|
String databaseName = condition.getDatabaseName(); |
|
|
ResultSet tablesResult = connection.getMetaData() |
|
|
ResultSet tablesResult = connection.getMetaData() |
|
|
.getTables(databaseName, condition.getSchemaName(), null, new String[]{"TABLE"}); |
|
|
.getTables(databaseName, condition.getSchemaName(), null, new String[]{"TABLE"}); |
|
|
|
|
|
try { |
|
|
while (tablesResult.next()) { |
|
|
while (tablesResult.next()) { |
|
|
String tableName = tablesResult.getString("TABLE_NAME"); |
|
|
String tableName = tablesResult.getString("TABLE_NAME"); |
|
|
if (condition.tableIsIgnored(tableName)) { |
|
|
if (condition.tableIsIgnored(tableName)) { |
|
@ -53,7 +54,8 @@ public class JdbcTableMetaRepository implements TableMetaRepository { |
|
|
List<ColumnMeta> columns = columnMetaRepository.selectColumns(connection, tableCondition); |
|
|
List<ColumnMeta> columns = columnMetaRepository.selectColumns(connection, tableCondition); |
|
|
if (columns.isEmpty()) { |
|
|
if (columns.isEmpty()) { |
|
|
if (log.isWarnEnabled()) { |
|
|
if (log.isWarnEnabled()) { |
|
|
log.warn("ignored table: " + databaseName + "." + tableName + ", caused by get empty columns"); |
|
|
log.warn("ignored table: " + databaseName + "." + tableName |
|
|
|
|
|
+ ", caused by get empty columns"); |
|
|
} |
|
|
} |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
@ -69,6 +71,9 @@ public class JdbcTableMetaRepository implements TableMetaRepository { |
|
|
tableMetas.add(tableMeta); |
|
|
tableMetas.add(tableMeta); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} finally { |
|
|
|
|
|
tablesResult.close(); |
|
|
|
|
|
} |
|
|
return tableMetas; |
|
|
return tableMetas; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|