HHH-16579 Add constructor to CockroachDialect

Hibernate Reactive needs a constructor that parses the version
and doesn't run a query on the database.
This commit is contained in:
Davide D'Alto 2023-05-10 15:41:28 +02:00 committed by Jan Schatteman
parent 1bb1ef93ee
commit 21b7510c40
1 changed files with 7 additions and 0 deletions

View File

@ -148,6 +148,13 @@ public class CockroachDialect extends Dialect {
this.driverKind = driverKind; this.driverKind = driverKind;
} }
/**
* For Hibernate Reactive
*/
public CockroachDialect(String version, PostgreSQLDriverKind driverKind) {
this( parseVersion( version ), driverKind );
}
protected static DatabaseVersion fetchDataBaseVersion( DialectResolutionInfo info ) { protected static DatabaseVersion fetchDataBaseVersion( DialectResolutionInfo info ) {
String versionString = null; String versionString = null;
if ( info.getDatabaseMetadata() != null ) { if ( info.getDatabaseMetadata() != null ) {