Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增对halo数据库的支持 #5632

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/com/alibaba/druid/DbType.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public enum DbType {
tydb(1L << 42),

starrocks(1L << 43),

halo(1L << 44),
ingres(0),
cloudscape(0),
timesten(0),
Expand Down
3 changes: 3 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 @@ -63,6 +63,9 @@ public interface JdbcConstants {

String HBASE = "hbase";

DbType HALO = DbType.halo;
String HALO_DRIVER = "com.halo.driver";

DbType HIVE = DbType.hive;
String HIVE_DRIVER = "org.apache.hive.jdbc.HiveDriver";

Expand Down
5 changes: 5 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 @@ -486,6 +486,8 @@ public static String getDriverClassName(String rawUrl) throws SQLException {
return "ca.edbc.jdbc.EdbcDriver";
} else if (rawUrl.startsWith("jdbc:mimer:multi1:")) {
return "com.mimer.jdbc.Driver";
} else if (rawUrl.startsWith("jdbc:halo:")) {
return JdbcConstants.HALO_DRIVER;
} else if (rawUrl.startsWith("jdbc:dm:")) {
return JdbcConstants.DM_DRIVER;
} else if (rawUrl.startsWith("jdbc:kingbase:")) {
Expand Down Expand Up @@ -607,6 +609,8 @@ public static DbType getDbTypeRaw(String rawUrl, String driverClassName) {
return DbType.mimer;
} else if (rawUrl.startsWith("jdbc:dm:")) {
return JdbcConstants.DM;
} else if (rawUrl.startsWith("jdbc:halo:")) {
return JdbcConstants.HALO;
} else if (rawUrl.startsWith("jdbc:kingbase:") || rawUrl.startsWith("jdbc:kingbase8:")) {
return JdbcConstants.KINGBASE;
} else if (rawUrl.startsWith("jdbc:gbase:")) {
Expand Down Expand Up @@ -984,6 +988,7 @@ public static boolean isPgsqlDbType(DbType dbType) {
case polardb:
case greenplum:
case gaussdb:
case halo:
return true;
default:
return false;
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/com/alibaba/druid/wall/WallFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ public synchronized void init(DataSourceProxy dataSource) {
provider = new SQLServerWallProvider(config);
break;
case postgresql:
case edb:
case halo:
case polardb:
case greenplum:
case gaussdb:
case edb:
if (config == null) {
config = new WallConfig(PGWallProvider.DEFAULT_CONFIG_DIR);
}
Expand Down