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 a8cd4ad932
commit 36ebd31f61
1 changed files with 7 additions and 0 deletions

View File

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