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
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final @Nullable Supplier<CalcitePrepare>Fields inherited from class org.apache.calcite.avatica.UnregisteredDriver
factory, handler -
Constructor Summary
ConstructorsModifierConstructorDescriptionDriver()Creates a Driver.protectedDriver(@Nullable Supplier<CalcitePrepare> prepareFactory) Creates a Driver with a factory forCalcitePrepareobjects; if the factory is null, the driver will callCalcitePrepare.DEFAULT_FACTORY. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.calcite.avatica.DriverVersionprotected org.apache.calcite.avatica.Handlerorg.apache.calcite.avatica.MetacreateMeta(org.apache.calcite.avatica.AvaticaConnection connection) Creates aCalcitePrepareto be used to prepare a statement for execution.protected Function0<CalcitePrepare>Deprecated.protected Collection<org.apache.calcite.avatica.ConnectionProperty>protected Stringprotected StringgetFactoryClassName(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 forCalcitePrepareobjects; if the factory is null, the driver will callCalcitePrepare.DEFAULT_FACTORY.
-
-
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 aCalcitePrepareto 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, please call
withPrepareFactory(Supplier)or overridecreatePrepare(). -
getConnectStringPrefix
- Specified by:
getConnectStringPrefixin classorg.apache.calcite.avatica.UnregisteredDriver
-
getFactoryClassName
protected String getFactoryClassName(org.apache.calcite.avatica.UnregisteredDriver.JdbcVersion jdbcVersion) - Overrides:
getFactoryClassNamein classorg.apache.calcite.avatica.UnregisteredDriver
-
createDriverVersion
protected org.apache.calcite.avatica.DriverVersion createDriverVersion()- Specified by:
createDriverVersionin classorg.apache.calcite.avatica.UnregisteredDriver
-
createHandler
protected org.apache.calcite.avatica.Handler createHandler()- Overrides:
createHandlerin classorg.apache.calcite.avatica.UnregisteredDriver
-
getConnectionProperties
- Overrides:
getConnectionPropertiesin classorg.apache.calcite.avatica.UnregisteredDriver
-
createMeta
public org.apache.calcite.avatica.Meta createMeta(org.apache.calcite.avatica.AvaticaConnection connection) - Specified by:
createMetain classorg.apache.calcite.avatica.UnregisteredDriver
-