Add constructor with DatabaseVersion parameter so hibernate provides connected DB version (#5573)

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
This commit is contained in:
jmarchionatto 2024-01-02 13:28:12 -05:00 committed by GitHub
parent a491c30aed
commit dee6795bde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 4 deletions

View File

@ -23,11 +23,15 @@ import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.DerbyDialect; import org.hibernate.dialect.DerbyDialect;
/** /**
* Dialect for Oracle database. * Dialect for Derby database.
* Minimum version: 10.14.2 * Minimum version: 10.14.2
*/ */
public class HapiFhirDerbyDialect extends DerbyDialect { public class HapiFhirDerbyDialect extends DerbyDialect {
public HapiFhirDerbyDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirDerbyDialect() { public HapiFhirDerbyDialect() {
super(DatabaseVersion.make(10, 14, 2)); super(DatabaseVersion.make(10, 14, 2));
} }

View File

@ -28,9 +28,10 @@ import org.hibernate.dialect.H2Dialect;
*/ */
public class HapiFhirH2Dialect extends H2Dialect { public class HapiFhirH2Dialect extends H2Dialect {
/** public HapiFhirH2Dialect(DatabaseVersion theDatabaseVersion) {
* Constructor super(theDatabaseVersion);
*/ }
public HapiFhirH2Dialect() { public HapiFhirH2Dialect() {
super(DatabaseVersion.make(2, 2, 220)); super(DatabaseVersion.make(2, 2, 220));
} }

View File

@ -28,6 +28,10 @@ import org.hibernate.dialect.MariaDBDialect;
*/ */
public class HapiFhirMariaDBDialect extends MariaDBDialect { public class HapiFhirMariaDBDialect extends MariaDBDialect {
public HapiFhirMariaDBDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirMariaDBDialect() { public HapiFhirMariaDBDialect() {
super(DatabaseVersion.make(10, 11, 5)); super(DatabaseVersion.make(10, 11, 5));
} }

View File

@ -28,6 +28,10 @@ import org.hibernate.dialect.MySQLDialect;
*/ */
public class HapiFhirMySQLDialect extends MySQLDialect { public class HapiFhirMySQLDialect extends MySQLDialect {
public HapiFhirMySQLDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirMySQLDialect() { public HapiFhirMySQLDialect() {
super(DatabaseVersion.make(5, 7)); super(DatabaseVersion.make(5, 7));
} }

View File

@ -28,6 +28,10 @@ import org.hibernate.dialect.OracleDialect;
*/ */
public class HapiFhirOracleDialect extends OracleDialect { public class HapiFhirOracleDialect extends OracleDialect {
public HapiFhirOracleDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirOracleDialect() { public HapiFhirOracleDialect() {
super(DatabaseVersion.make(12, 2)); super(DatabaseVersion.make(12, 2));
} }

View File

@ -24,6 +24,10 @@ import org.hibernate.dialect.PostgreSQLDialect;
public class HapiFhirPostgresDialect extends PostgreSQLDialect { public class HapiFhirPostgresDialect extends PostgreSQLDialect {
public HapiFhirPostgresDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirPostgresDialect() { public HapiFhirPostgresDialect() {
super(DatabaseVersion.make(10, 0, 0)); super(DatabaseVersion.make(10, 0, 0));
} }

View File

@ -28,6 +28,10 @@ import org.hibernate.dialect.SQLServerDialect;
*/ */
public class HapiFhirSQLServerDialect extends SQLServerDialect { public class HapiFhirSQLServerDialect extends SQLServerDialect {
public HapiFhirSQLServerDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirSQLServerDialect() { public HapiFhirSQLServerDialect() {
super(DatabaseVersion.make(11)); super(DatabaseVersion.make(11));
} }