use of io.shardingjdbc.core.constant.DatabaseType in project sharding-jdbc by shardingjdbc.
the class AbstractDataSourceAdapter method getDatabaseType.
protected DatabaseType getDatabaseType(final Collection<DataSource> dataSources) throws SQLException {
DatabaseType result = null;
for (DataSource each : dataSources) {
DatabaseType databaseType = getDatabaseType(each);
Preconditions.checkState(null == result || result.equals(databaseType), String.format("Database type inconsistent with '%s' and '%s'", result, databaseType));
result = databaseType;
}
return result;
}
Aggregations