Open
Description
What would you like to be improved?
load method in JdbcDatabaseOperations
will load all databases. if there are a lot of databases, it takes a lot of time.
@Override
public JdbcSchema load(String databaseName) throws NoSuchSchemaException {
// We need to load the database as needed NOT load them all.
List<String> allDatabases = listDatabases();
String dbName =
allDatabases.stream()
.filter(db -> db.equals(databaseName))
.findFirst()
.orElseThrow(
() -> new NoSuchSchemaException("Database %s could not be found", databaseName));
return JdbcSchema.builder()
.withName(dbName)
.withProperties(ImmutableMap.of())
.withAuditInfo(AuditInfo.EMPTY)
.build();
}
How should we improve?
No response
Activity