use of com.developmentontheedge.be5.metadata.sql.schema.DbmsSchemaReader in project be5 by DevelopmentOnTheEdge.
the class AppSync method readSchema.
private void readSchema() throws ExtendedSqlException, SQLException, ProcessInterruptedException {
getLog().info("Read database scheme ...");
long time = System.currentTimeMillis();
ProcessController controller = new NullLogger();
Rdbms rdbms = DatabaseUtils.getRdbms(connector);
DbmsSchemaReader schemaReader = rdbms.getSchemaReader();
defSchema = schemaReader.getDefaultSchema(sqlExecutor);
tableTypes = schemaReader.readTableNames(sqlExecutor, defSchema, controller);
columns = schemaReader.readColumns(sqlExecutor, defSchema, controller);
indices = schemaReader.readIndices(sqlExecutor, defSchema, controller);
if (debug) {
if (!warnings.isEmpty()) {
System.err.println(warnings.size() + " warning(s) during loading the project from " + sqlExecutor.getConnector().getConnectString());
Collections.sort(warnings);
for (String warning : warnings) {
System.err.println(warning);
}
}
}
getLog().info("comleted, " + (System.currentTimeMillis() - time) + "ms.");
}
Aggregations