Package org.apache.calcite.jdbc
Class Driver
java.lang.Object
org.apache.calcite.avatica.UnregisteredDriver
org.apache.calcite.jdbc.Driver
- All Implemented Interfaces:
Driver
- Direct Known Subclasses:
SplunkDriver
public class Driver
extends org.apache.calcite.avatica.UnregisteredDriver
Calcite JDBC driver.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.avatica.UnregisteredDriver
org.apache.calcite.avatica.UnregisteredDriver.JdbcVersion
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected final @Nullable Supplier<CalcitePrepare>
Fields inherited from class org.apache.calcite.avatica.UnregisteredDriver
factory, handler
-
Constructor Summary
ModifierConstructorDescriptionDriver()
Creates a Driver.protected
Driver
(@Nullable Supplier<CalcitePrepare> prepareFactory) Creates a Driver with a factory forCalcitePrepare
objects; if the factory is null, the driver will callcreatePrepareFactory()
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.calcite.avatica.DriverVersion
protected org.apache.calcite.avatica.Handler
org.apache.calcite.avatica.Meta
createMeta
(org.apache.calcite.avatica.AvaticaConnection connection) Creates aCalcitePrepare
to be used to prepare a statement for execution.protected Function0<CalcitePrepare>
Deprecated.protected Collection<org.apache.calcite.avatica.ConnectionProperty>
protected String
protected String
getFactoryClassName
(org.apache.calcite.avatica.UnregisteredDriver.JdbcVersion jdbcVersion) withPrepareFactory
(Supplier<CalcitePrepare> prepareFactory) Creates a copy of this Driver with a new factory for creatingCalcitePrepare
.Methods inherited from class org.apache.calcite.avatica.UnregisteredDriver
acceptsURL, connect, createFactory, getDriverVersion, getMajorVersion, getMinorVersion, getParentLogger, getPropertyInfo, instantiateFactory, jdbcCompliant, register
-
Field Details
-
CONNECT_STRING_PREFIX
- See Also:
-
prepareFactory
-
-
Constructor Details
-
Driver
public Driver()Creates a Driver. -
Driver
Creates a Driver with a factory forCalcitePrepare
objects; if the factory is null, the driver will callcreatePrepareFactory()
.
-
-
Method Details
-
withPrepareFactory
Creates a copy of this Driver with a new factory for creatingCalcitePrepare
.Allows users of the Driver to change the factory without subclassing the Driver. But subclasses of the driver should override this method to create an instance of their subclass.
- Parameters:
prepareFactory
- Supplier of aCalcitePrepare
- Returns:
- Driver with the provided prepareFactory
-
createPrepare
Creates aCalcitePrepare
to be used to prepare a statement for execution.If you wish to use a custom prepare, either override this method or call
withPrepareFactory(Supplier)
. -
createPrepareFactory
Deprecated.Returns a factory with which to create aCalcitePrepare
.Now deprecated; if you wish to use a custom prepare, overrides of this method will still work, but we prefer that you call
withPrepareFactory(Supplier)
or overridecreatePrepare()
. -
getConnectStringPrefix
- Specified by:
getConnectStringPrefix
in classorg.apache.calcite.avatica.UnregisteredDriver
-
getFactoryClassName
protected String getFactoryClassName(org.apache.calcite.avatica.UnregisteredDriver.JdbcVersion jdbcVersion) - Overrides:
getFactoryClassName
in classorg.apache.calcite.avatica.UnregisteredDriver
-
createDriverVersion
protected org.apache.calcite.avatica.DriverVersion createDriverVersion()- Specified by:
createDriverVersion
in classorg.apache.calcite.avatica.UnregisteredDriver
-
createHandler
protected org.apache.calcite.avatica.Handler createHandler()- Overrides:
createHandler
in classorg.apache.calcite.avatica.UnregisteredDriver
-
getConnectionProperties
- Overrides:
getConnectionProperties
in classorg.apache.calcite.avatica.UnregisteredDriver
-
createMeta
public org.apache.calcite.avatica.Meta createMeta(org.apache.calcite.avatica.AvaticaConnection connection) - Specified by:
createMeta
in classorg.apache.calcite.avatica.UnregisteredDriver
-