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;
/**
* Dialect for Oracle database.
* Dialect for Derby database.
* Minimum version: 10.14.2
*/
public class HapiFhirDerbyDialect extends DerbyDialect {
public HapiFhirDerbyDialect(DatabaseVersion theDatabaseVersion) {
super(theDatabaseVersion);
}
public HapiFhirDerbyDialect() {
super(DatabaseVersion.make(10, 14, 2));
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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