Skip to content

Commit

Permalink
适配南大通用GBase 8s数据库
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliulingbo authored and lizongbo committed Apr 13, 2024
1 parent c933dd8 commit d2a3249
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,7 @@ protected void initCheck() throws SQLException {
|| JdbcUtils.MYSQL_DRIVER_6.equals(this.driverClass)
|| JdbcUtils.MYSQL_DRIVER_603.equals(this.driverClass)
|| JdbcUtils.GOLDENDB_DRIVER.equals(this.driverClass)
|| JdbcUtils.GBASE8S_DRIVER.equals(this.driverClass)
) {
isMySql = true;
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/com/alibaba/druid/util/JdbcConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,6 @@ public interface JdbcConstants {
String TAOS_DATA_RS = "com.taosdata.jdbc.rs.RestfulDriver";

String GOLDENDB_DRIVER = "com.goldendb.jdbc.Driver";

String GBASE8S_DRIVER = "com.gbasedbt.jdbc.Driver";
}
2 changes: 2 additions & 0 deletions core/src/main/java/com/alibaba/druid/util/JdbcUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ public static String getDriverClassName(String rawUrl) throws SQLException {
return JdbcConstants.TAOS_DATA;
} else if (rawUrl.startsWith("jdbc:TAOS-RS:")) {
return JdbcConstants.TAOS_DATA_RS;
} else if (rawUrl.startsWith("jdbc:gbasedbt-sqli:")) {
return JdbcConstants.GBASE8S_DRIVER;
} else {
throw new SQLException("unknown jdbc driver : " + rawUrl);
}
Expand Down

0 comments on commit d2a3249

Please sign in to comment.