fix: Oracle 数据库数据集 获取数据表字段错误 #4933

This commit is contained in:
taojinlong 2023-04-10 11:57:15 +08:00
parent 760c25b07a
commit 8f37a452e8

View File

@ -94,7 +94,11 @@ public class JdbcProvider extends DefaultJdbcProvider {
tableNamePattern = String.format(MySQLConstants.KEYWORD_TABLE, tableNamePattern);
}
}
ResultSet resultSet = databaseMetaData.getColumns(null, "%", tableNamePattern, "%");
String schemaPattern = "%";
if (datasourceRequest.getDatasource().getType().equalsIgnoreCase(DatasourceTypes.oracle.name())) {
schemaPattern = databaseMetaData.getUserName();
}
ResultSet resultSet = databaseMetaData.getColumns(null, schemaPattern, tableNamePattern, "%");
while (resultSet.next()) {
String tableName = resultSet.getString("TABLE_NAME");
String database;