-
Notifications
You must be signed in to change notification settings - Fork 41.1k
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
Detect Kingbase JDBC driver #44710
Detect Kingbase JDBC driver #44710
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=3.5.0-SNAPSHOT | ||
version=3.4.0 | ||
latestVersion=true | ||
spring.build-type=oss | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,19 @@ public enum DatabaseDriver { | |
*/ | ||
POSTGRESQL("PostgreSQL", "org.postgresql.Driver", "org.postgresql.xa.PGXADataSource", "SELECT 1"), | ||
|
||
/** | ||
* Kingbase. | ||
* @since 3.4.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
*/ | ||
KINGBASE("KingbaseES","com.kingbase8.Driver","com.kingbase8.xa.KBXADataSource","SELECT 1") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is still an issue with the formatting. Please refer to the Spring Boot Contributing Guidelines. Please use |
||
|
||
@Override | ||
protected Collection<String> getUrlPrefixes() { | ||
return Collections.singleton("kingbase8"); | ||
} | ||
|
||
}, | ||
|
||
/** | ||
* Amazon Redshift. | ||
* @since 2.2.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ void databaseProductNameLookups() { | |
assertThat(DatabaseDriver.fromProductName("MariaDB")).isEqualTo(DatabaseDriver.MARIADB); | ||
assertThat(DatabaseDriver.fromProductName("Oracle")).isEqualTo(DatabaseDriver.ORACLE); | ||
assertThat(DatabaseDriver.fromProductName("PostgreSQL")).isEqualTo(DatabaseDriver.POSTGRESQL); | ||
assertThat(DatabaseDriver.fromProductName("KingbaseES")).isEqualTo(DatabaseDriver.KingbaseES); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compile error:
Please run |
||
assertThat(DatabaseDriver.fromProductName("Redshift")).isEqualTo(DatabaseDriver.REDSHIFT); | ||
assertThat(DatabaseDriver.fromProductName("Microsoft SQL Server")).isEqualTo(DatabaseDriver.SQLSERVER); | ||
assertThat(DatabaseDriver.fromProductName("SQL SERVER")).isEqualTo(DatabaseDriver.SQLSERVER); | ||
|
@@ -99,6 +100,8 @@ void databaseJdbcUrlLookups() { | |
.isEqualTo(DatabaseDriver.ORACLE); | ||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:postgresql://127.0.0.1:5432/sample")) | ||
.isEqualTo(DatabaseDriver.POSTGRESQL); | ||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:kingbase8://localhost:54321/test")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test fails. Please run |
||
.isEqualTo(DatabaseDriver.POSTGRESQL); | ||
assertThat(DatabaseDriver | ||
.fromJdbcUrl("jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com:5439/sample")) | ||
.isEqualTo(DatabaseDriver.REDSHIFT); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert.