public class DriverVersion extends Object
Each driver implementation must provide an instance of this class, in
order to implement UnregisteredDriver.createDriverVersion()
.
There are two typical ways for a driver to instantiate its version information:
load(java.lang.Class<? extends org.apache.calcite.avatica.UnregisteredDriver>, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
.Modifier and Type | Field and Description |
---|---|
int |
databaseMajorVersion |
int |
databaseMinorVersion |
boolean |
jdbcCompliant |
int |
majorVersion |
int |
minorVersion |
String |
name |
String |
productName |
String |
productVersion |
String |
versionString |
Constructor and Description |
---|
DriverVersion(String name,
String versionString,
String productName,
String productVersion,
boolean jdbcCompliant,
int majorVersion,
int minorVersion,
int databaseMajorVersion,
int databaseMinorVersion)
Creates a DriverVersion.
|
Modifier and Type | Method and Description |
---|---|
static DriverVersion |
load(Class<? extends UnregisteredDriver> driverClass,
String resourceName,
String driverName,
String driverVersion,
String productName,
String productVersion)
Loads a driver version from a properties file, read from the classpath.
|
public final int majorVersion
public final int minorVersion
public final String name
public final String versionString
public final String productName
public final String productVersion
public final boolean jdbcCompliant
public final int databaseMajorVersion
public final int databaseMinorVersion
public static DriverVersion load(Class<? extends UnregisteredDriver> driverClass, String resourceName, String driverName, String driverVersion, String productName, String productVersion)
driverClass
- Class of driver; used to find resourceresourceName
- Name of resource filedriverName
- Fallback name of driverdriverVersion
- Fallback version of driverproductName
- Fallback product nameproductVersion
- Fallback product versionCopyright © 2012-2024 Apache Software Foundation. All Rights Reserved.