未验证 提交 08368dd1 编写于 作者: kimmking's avatar kimmking 提交者: GitHub

carry to fix TableMetaData load error when use oracle. (#5436) (#5787)

* carry to fix TableMetaData load error when use oracle. (#5436)

* fix TableMetaData load error when use oracle.

* optimize code style.

* check index name
Co-authored-by: NTaoZhi <UIT_TAOZHI@163.com>
上级 8b9bbf13
......@@ -101,7 +101,7 @@ public final class ColumnMetaDataLoader {
delimiterLeft = "";
delimiterRight = "";
}
return "SELECT * FROM " + delimiterLeft + table + delimiterRight + " WHERE 1 != 1;";
return "SELECT * FROM " + delimiterLeft + table + delimiterRight + " WHERE 1 != 1";
}
private static boolean isTableExist(final Connection connection, final String catalog, final String table) throws SQLException {
......
......@@ -48,7 +48,9 @@ public final class IndexMetaDataLoader {
try (ResultSet resultSet = connection.getMetaData().getIndexInfo(connection.getCatalog(), JdbcUtil.getSchema(connection), table, false, false)) {
while (resultSet.next()) {
String indexName = resultSet.getString(INDEX_NAME);
result.add(new IndexMetaData(indexName));
if (null != indexName) {
result.add(new IndexMetaData(indexName));
}
}
}
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册