Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ public String getId() {
POSTGRESQL("PostgreSQL", "org.postgresql.Driver", "org.postgresql.xa.PGXADataSource",
"SELECT 1"),

/**
* SAP - SAP Hana Database - HDB.
*/
SAP("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP",
"SELECT 1 FROM DUMMY"),

/**
* jTDS. As it can be used for several databases, there isn't a single product name we
* could rely on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void databaseProductNameLookups() {
assertThat(DatabaseDriver.fromProductName("Apache Derby"))
.isEqualTo(DatabaseDriver.DERBY);
assertThat(DatabaseDriver.fromProductName("H2")).isEqualTo(DatabaseDriver.H2);
assertThat(DatabaseDriver.fromProductName("HDB")).isEqualTo(DatabaseDriver.SAP);
assertThat(DatabaseDriver.fromProductName("HSQL Database Engine"))
.isEqualTo(DatabaseDriver.HSQLDB);
assertThat(DatabaseDriver.fromProductName("SQLite"))
Expand Down Expand Up @@ -113,6 +114,8 @@ public void databaseJdbcUrlLookups() {
.isEqualTo(DatabaseDriver.DERBY);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:h2:~/sample"))
.isEqualTo(DatabaseDriver.H2);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:sap:localhost"))
.isEqualTo(DatabaseDriver.SAP);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:hsqldb:hsql://localhost"))
.isEqualTo(DatabaseDriver.HSQLDB);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:sqlite:sample.db"))
Expand Down