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 |
Modifier | Constructor and Description |
---|---|
protected |
CalciteConnectionImpl(Driver driver,
org.apache.calcite.avatica.AvaticaFactory factory,
java.lang.String url,
java.util.Properties info,
CalciteSchema rootSchema,
JavaTypeFactory typeFactory)
Creates a CalciteConnectionImpl.
|
Modifier and Type | Method and Description |
---|---|
CalciteConnectionConfig |
config() |
DataContext |
createDataContext(java.util.Map<java.lang.String,java.lang.Object> parameterValues,
CalciteSchema rootSchema) |
CalcitePrepare.Context |
createPrepareContext()
Creates a context for preparing a statement for execution.
|
<T> Queryable<T> |
createQuery(Expression expression,
java.lang.Class<T> rowType) |
<T> Queryable<T> |
createQuery(Expression expression,
java.lang.reflect.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,
java.lang.Class<T> type) |
<T> T |
execute(Expression expression,
java.lang.reflect.Type type) |
<T> Enumerator<T> |
executeQuery(Queryable<T> queryable) |
java.util.concurrent.atomic.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() |
java.util.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(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
<T> T |
unwrap(java.lang.Class<T> iface) |
abort, checkOpen, 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, setTypeMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSchema, setSchema
abort, 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, setTypeMap
public 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, java.lang.String url, java.util.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 CalciteConnection
config
in class org.apache.calcite.avatica.AvaticaConnection
public CalcitePrepare.Context createPrepareContext()
CalciteConnection
createPrepareContext
in interface CalciteConnection
void init()
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
unwrap
in class org.apache.calcite.avatica.AvaticaConnection
java.sql.SQLException
public CalciteStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
createStatement
in class org.apache.calcite.avatica.AvaticaConnection
java.sql.SQLException
public CalcitePreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
prepareStatement
in class org.apache.calcite.avatica.AvaticaConnection
java.sql.SQLException
private CalcitePreparedStatement prepareStatement_(CalcitePrepare.Query<?> query, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
java.sql.SQLException
<T> CalcitePrepare.CalciteSignature<T> parseQuery(CalcitePrepare.Query<T> query, CalcitePrepare.Context prepareContext, long maxRowCount)
public java.util.concurrent.atomic.AtomicBoolean getCancelFlag(org.apache.calcite.avatica.Meta.StatementHandle handle) throws org.apache.calcite.avatica.NoSuchStatementException
getCancelFlag
in class org.apache.calcite.avatica.AvaticaConnection
org.apache.calcite.avatica.NoSuchStatementException
public SchemaPlus getRootSchema()
CalciteConnection
You can define objects (such as relations) in this schema, and also nested schemas.
getRootSchema
in interface CalciteConnection
public JavaTypeFactory getTypeFactory()
CalciteConnection
getTypeFactory
in interface CalciteConnection
public java.util.Properties getProperties()
CalciteConnection
NOTE: 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 CalciteConnection
public <T> Queryable<T> createQuery(Expression expression, java.lang.Class<T> rowType)
createQuery
in interface QueryProvider
public <T> Queryable<T> createQuery(Expression expression, java.lang.reflect.Type rowType)
createQuery
in interface QueryProvider
public <T> T execute(Expression expression, java.lang.reflect.Type type)
execute
in interface QueryProvider
public <T> T execute(Expression expression, java.lang.Class<T> type)
execute
in interface QueryProvider
public <T> Enumerator<T> executeQuery(Queryable<T> queryable)
executeQuery
in interface QueryProvider
public <T> Enumerable<T> enumerable(org.apache.calcite.avatica.Meta.StatementHandle handle, CalcitePrepare.CalciteSignature<T> signature) throws java.sql.SQLException
java.sql.SQLException
public DataContext createDataContext(java.util.Map<java.lang.String,java.lang.Object> parameterValues, CalciteSchema rootSchema)
org.apache.calcite.avatica.UnregisteredDriver getDriver()
org.apache.calcite.avatica.AvaticaFactory getFactory()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.