forked from lxm_tools/screw
修正使用HikariDataSource时CacheDB(2016)生成文档报错的问题.
This commit is contained in:
@@ -140,7 +140,13 @@ public abstract class AbstractDatabaseQuery implements DatabaseQuery {
|
||||
* @return Schema
|
||||
*/
|
||||
private String verifySchema(DataSource dataSource) throws SQLException {
|
||||
String schema = dataSource.getConnection().getSchema();
|
||||
String schema;
|
||||
if (dataSource instanceof HikariDataSource) {
|
||||
schema = ((HikariDataSource) dataSource).getSchema();
|
||||
} else {
|
||||
schema = dataSource.getConnection().getSchema();
|
||||
}
|
||||
|
||||
//验证是否有此Schema
|
||||
ResultSet resultSet = this.getConnection().getMetaData().getSchemas();
|
||||
while (resultSet.next()) {
|
||||
|
||||
Reference in New Issue
Block a user