Merge pull request #16831 from hekonsek

* pr/16831:
  Polish "Add support for AWS Redshift JDBC driver"
  Add support for AWS Redshift JDBC driver
pull/16905/head
Stephane Nicoll 6 years ago
commit 4f4fe01444

@ -99,6 +99,12 @@ public enum DatabaseDriver {
POSTGRESQL("PostgreSQL", "org.postgresql.Driver", "org.postgresql.xa.PGXADataSource",
"SELECT 1"),
/**
* Amazon Redshift.
* @since 2.2.0
*/
REDSHIFT("Amazon Redshift", "com.amazon.redshift.jdbc.Driver", null, "SELECT 1"),
/**
* HANA - SAP HANA Database - HDB.
* @since 2.1.0

@ -81,6 +81,8 @@ public class DatabaseDriverTests {
.isEqualTo(DatabaseDriver.ORACLE);
assertThat(DatabaseDriver.fromProductName("PostgreSQL"))
.isEqualTo(DatabaseDriver.POSTGRESQL);
assertThat(DatabaseDriver.fromProductName("Amazon Redshift"))
.isEqualTo(DatabaseDriver.REDSHIFT);
assertThat(DatabaseDriver.fromProductName("Microsoft SQL Server"))
.isEqualTo(DatabaseDriver.SQLSERVER);
assertThat(DatabaseDriver.fromProductName("SQL SERVER"))
@ -120,6 +122,9 @@ public class DatabaseDriverTests {
.isEqualTo(DatabaseDriver.ORACLE);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:postgresql://127.0.0.1:5432/sample"))
.isEqualTo(DatabaseDriver.POSTGRESQL);
assertThat(DatabaseDriver.fromJdbcUrl(
"jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com:5439/sample"))
.isEqualTo(DatabaseDriver.REDSHIFT);
assertThat(
DatabaseDriver.fromJdbcUrl("jdbc:jtds:sqlserver://127.0.0.1:1433/sample"))
.isEqualTo(DatabaseDriver.JTDS);

Loading…
Cancel
Save