abstract class CalciteConnectionImpl extends org.apache.calcite.avatica.AvaticaConnection implements CalciteConnection, QueryProvider
Abstract to allow newer versions of JDBC to add methods.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
CalciteConnectionImpl.CalciteQueryable<T>
Implementation of Queryable.
|
private static class |
CalciteConnectionImpl.CalciteServerImpl
Implementation of Server.
|
(package private) static class |
CalciteConnectionImpl.CalciteServerStatementImpl
Implementation of
CalciteServerStatement. |
(package private) static class |
CalciteConnectionImpl.ContextImpl
Implementation of Context.
|
(package private) static class |
CalciteConnectionImpl.DataContextImpl
Implementation of DataContext.
|
(package private) static class |
CalciteConnectionImpl.RootSchema
Schema that has no parents.
|
private static class |
CalciteConnectionImpl.SlimDataContext
Implementation of
DataContext that has few variables and is
Serializable. |
| Modifier and Type | Field and Description |
|---|---|
(package private) Function0<CalcitePrepare> |
prepareFactory |
(package private) CalciteSchema |
rootSchema |
(package private) CalciteServer |
server |
(package private) static org.apache.calcite.avatica.AvaticaConnection.Trojan |
TROJAN |
JavaTypeFactory |
typeFactory |
driver, factory, handle, helper, id, info, maxRetriesPerExecute, meta, metaData, NUM_EXECUTE_RETRIES_DEFAULT, NUM_EXECUTE_RETRIES_KEY, PLAN_COLUMN_NAME, properties, ROWCOUNT_COLUMN_NAME, statementCount, statementMapTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Modifier | Constructor and Description |
|---|---|
protected |
CalciteConnectionImpl(Driver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory)
Creates a CalciteConnectionImpl.
|
| Modifier and Type | Method and Description |
|---|---|
CalciteConnectionConfig |
config() |
DataContext |
createDataContext(Map<String,Object> parameterValues,
CalciteSchema rootSchema) |
CalcitePrepare.Context |
createPrepareContext()
Creates a context for preparing a statement for execution.
|
<T> Queryable<T> |
createQuery(Expression expression,
Class<T> rowType) |
<T> Queryable<T> |
createQuery(Expression expression,
Type rowType) |
CalciteStatement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
<T> Enumerable<T> |
enumerable(org.apache.calcite.avatica.Meta.StatementHandle handle,
CalcitePrepare.CalciteSignature<T> signature) |
<T> T |
execute(Expression expression,
Class<T> type) |
<T> T |
execute(Expression expression,
Type type) |
<T> Enumerator<T> |
executeQuery(Queryable<T> queryable) |
AtomicBoolean |
getCancelFlag(org.apache.calcite.avatica.Meta.StatementHandle handle) |
(package private) org.apache.calcite.avatica.UnregisteredDriver |
getDriver() |
(package private) org.apache.calcite.avatica.AvaticaFactory |
getFactory() |
Properties |
getProperties()
Returns an instance of the connection properties.
|
SchemaPlus |
getRootSchema()
Returns the root schema.
|
JavaTypeFactory |
getTypeFactory()
Returns the type factory.
|
(package private) void |
init()
Called after the constructor has completed and the model has been
loaded.
|
(package private) CalciteMetaImpl |
meta() |
(package private) <T> CalcitePrepare.CalciteSignature<T> |
parseQuery(CalcitePrepare.Query<T> query,
CalcitePrepare.Context prepareContext,
long maxRowCount) |
private CalcitePreparedStatement |
prepareStatement_(CalcitePrepare.Query<?> query,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
CalcitePreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
<T> T |
unwrap(Class<T> iface) |
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createResultSet, createSQLXML, createStatement, createStatement, createStruct, createTrojan, executeBatchUpdateInternal, executeQueryInternal, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getKerberosConnection, getMetaData, getNetworkTimeout, getSchema, getService, getTimeZone, getTransactionIsolation, getTypeMap, getWarnings, invokeWithRetries, isClosed, isReadOnly, isValid, isWrapperFor, lookupStatement, nativeSQL, openConnection, prepareAndExecuteInternal, prepareAndUpdateBatch, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setKerberosConnection, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setService, setTransactionIsolation, setTypeMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSchema, setSchemaabort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMapisWrapperForpublic final JavaTypeFactory typeFactory
final CalciteSchema rootSchema
final Function0<CalcitePrepare> prepareFactory
final CalciteServer server
static final org.apache.calcite.avatica.AvaticaConnection.Trojan TROJAN
protected CalciteConnectionImpl(Driver driver, org.apache.calcite.avatica.AvaticaFactory factory, String url, Properties info, CalciteSchema rootSchema, JavaTypeFactory typeFactory)
Not public; method is called only from the driver.
driver - Driverfactory - Factory for JDBC objectsurl - Server URLinfo - Other connection propertiesrootSchema - Root schema, or nulltypeFactory - Type factory, or nullCalciteMetaImpl meta()
public CalciteConnectionConfig config()
config in interface CalciteConnectionconfig in class org.apache.calcite.avatica.AvaticaConnectionpublic CalcitePrepare.Context createPrepareContext()
CalciteConnectioncreatePrepareContext in interface CalciteConnectionvoid init()
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface Wrapperunwrap in class org.apache.calcite.avatica.AvaticaConnectionSQLExceptionpublic CalciteStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement in interface ConnectioncreateStatement in class org.apache.calcite.avatica.AvaticaConnectionSQLExceptionpublic CalcitePreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class org.apache.calcite.avatica.AvaticaConnectionSQLExceptionprivate CalcitePreparedStatement prepareStatement_(CalcitePrepare.Query<?> query, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLException<T> CalcitePrepare.CalciteSignature<T> parseQuery(CalcitePrepare.Query<T> query, CalcitePrepare.Context prepareContext, long maxRowCount)
public AtomicBoolean getCancelFlag(org.apache.calcite.avatica.Meta.StatementHandle handle) throws org.apache.calcite.avatica.NoSuchStatementException
getCancelFlag in class org.apache.calcite.avatica.AvaticaConnectionorg.apache.calcite.avatica.NoSuchStatementExceptionpublic SchemaPlus getRootSchema()
CalciteConnectionYou can define objects (such as relations) in this schema, and also nested schemas.
getRootSchema in interface CalciteConnectionpublic JavaTypeFactory getTypeFactory()
CalciteConnectiongetTypeFactory in interface CalciteConnectionpublic Properties getProperties()
CalciteConnectionNOTE: The resulting collection of properties is same collection used by the connection, and is writable, but behavior if you modify the collection is undefined. Some implementations might, for example, see a modified property, but only if you set it before you create a statement. We will remove this method when there are better implementations of stateful connections and configuration.
getProperties in interface CalciteConnectionpublic <T> Queryable<T> createQuery(Expression expression, Class<T> rowType)
createQuery in interface QueryProviderpublic <T> Queryable<T> createQuery(Expression expression, Type rowType)
createQuery in interface QueryProviderpublic <T> T execute(Expression expression, Type type)
execute in interface QueryProviderpublic <T> T execute(Expression expression, Class<T> type)
execute in interface QueryProviderpublic <T> Enumerator<T> executeQuery(Queryable<T> queryable)
executeQuery in interface QueryProviderpublic <T> Enumerable<T> enumerable(org.apache.calcite.avatica.Meta.StatementHandle handle, CalcitePrepare.CalciteSignature<T> signature) throws SQLException
SQLExceptionpublic DataContext createDataContext(Map<String,Object> parameterValues, CalciteSchema rootSchema)
org.apache.calcite.avatica.UnregisteredDriver getDriver()
org.apache.calcite.avatica.AvaticaFactory getFactory()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.