public class DrillConnectionImpl extends org.apache.calcite.avatica.AvaticaConnection implements DrillConnection
Connection
.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, statementMap
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Constructor and Description |
---|
DrillConnectionImpl(DriverImpl driver,
org.apache.calcite.avatica.AvaticaFactory factory,
String url,
Properties info) |
Modifier and Type | Method and Description |
---|---|
void |
abort(Executor executor) |
protected void |
checkOpen()
Throws AlreadyClosedSqlException iff this Connection is closed.
|
void |
close() |
void |
commit()
Drill:
Not supported.
|
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
protected ResultSet |
createResultSet(org.apache.calcite.avatica.Meta.MetaResultSet metaResultSet,
org.apache.calcite.avatica.QueryState state) |
SQLXML |
createSQLXML() |
DrillStatementImpl |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Struct |
createStruct(String typeName,
Object[] attributes) |
DrillClient |
getClient() |
DrillConnectionConfig |
getConfig()
Returns a view onto this connection's configuration properties.
|
protected Drillbit |
getDrillbit() |
int |
getNetworkTimeout()
Drill:
Returns zero.
|
String |
getSchema() |
TimeZone |
getTimeZone() |
Map<String,Class<?>> |
getTypeMap() |
boolean |
isClosed() |
boolean |
isValid(int timeout) |
String |
nativeSQL(String sql) |
protected org.apache.calcite.avatica.Meta.ExecuteResult |
prepareAndExecuteInternal(org.apache.calcite.avatica.AvaticaStatement statement,
String sql,
long maxRowCount) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseSavepoint(Savepoint savepoint)
Drill:
Not supported.
|
void |
rollback()
Drill:
Not supported.
|
void |
rollback(Savepoint savepoint)
Drill:
Not supported.
|
void |
setAutoCommit(boolean autoCommit) |
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setNetworkTimeout(Executor executor,
int milliseconds)
Drill:
Not supported (for non-zero timeout value).
|
Savepoint |
setSavepoint()
Drill:
Not supported.
|
Savepoint |
setSavepoint(String name)
Drill:
Not supported.
|
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> map) |
clearWarnings, config, createArrayOf, createStatement, createStatement, createTrojan, executeBatchUpdateInternal, executeQueryInternal, getAutoCommit, getCancelFlag, getCatalog, getClientInfo, getClientInfo, getHoldability, getKerberosConnection, getMetaData, getService, getTransactionIsolation, getWarnings, invokeWithRetries, isReadOnly, isWrapperFor, lookupStatement, openConnection, prepareAndUpdateBatch, prepareStatement, prepareStatement, prepareStatement, setCatalog, setHoldability, setKerberosConnection, setReadOnly, setService, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAutoCommit, getTransactionIsolation, isWrapperFor, unwrap
clearWarnings, createArrayOf, createStatement, createStatement, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getWarnings, isReadOnly, prepareStatement, prepareStatement, prepareStatement, setCatalog, setHoldability, setReadOnly
public DrillConnectionImpl(DriverImpl driver, org.apache.calcite.avatica.AvaticaFactory factory, String url, Properties info) throws SQLException
SQLException
protected ResultSet createResultSet(org.apache.calcite.avatica.Meta.MetaResultSet metaResultSet, org.apache.calcite.avatica.QueryState state) throws SQLException
createResultSet
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
protected org.apache.calcite.avatica.Meta.ExecuteResult prepareAndExecuteInternal(org.apache.calcite.avatica.AvaticaStatement statement, String sql, long maxRowCount) throws SQLException, org.apache.calcite.avatica.NoSuchStatementException
prepareAndExecuteInternal
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
org.apache.calcite.avatica.NoSuchStatementException
protected void checkOpen() throws AlreadyClosedSqlException
checkOpen
in class org.apache.calcite.avatica.AvaticaConnection
AlreadyClosedSqlException
- if Connection is closedpublic DrillConnectionConfig getConfig()
DrillConnection
Properties.getProperty(String)
.getConfig
in interface DrillConnection
public DrillClient getClient()
getClient
in interface DrillConnection
public void setAutoCommit(boolean autoCommit) throws SQLException
DrillConnection
Drill:
Accepts only true
.
setAutoCommit
in interface Connection
setAutoCommit
in interface DrillConnection
setAutoCommit
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void commit() throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).commit
in interface Connection
commit
in interface DrillConnection
commit
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void rollback() throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).rollback
in interface Connection
rollback
in interface DrillConnection
rollback
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public boolean isClosed()
DrillConnection
Drill: Does not throw SQLException.
isClosed
in interface Connection
isClosed
in interface DrillConnection
isClosed
in class org.apache.calcite.avatica.AvaticaConnection
public Savepoint setSavepoint() throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).setSavepoint
in interface Connection
setSavepoint
in interface DrillConnection
setSavepoint
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public Savepoint setSavepoint(String name) throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).setSavepoint
in interface Connection
setSavepoint
in interface DrillConnection
setSavepoint
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void rollback(Savepoint savepoint) throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).rollback
in interface Connection
rollback
in interface DrillConnection
rollback
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void releaseSavepoint(Savepoint savepoint) throws SQLException
DrillConnection
SQLFeatureNotSupportedException
(or
AlreadyClosedSqlException
).releaseSavepoint
in interface Connection
releaseSavepoint
in interface DrillConnection
releaseSavepoint
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void setTransactionIsolation(int level) throws SQLException
DrillConnection
Drill:
Accepts only Connection.TRANSACTION_NONE
.
setTransactionIsolation
in interface Connection
setTransactionIsolation
in interface DrillConnection
setTransactionIsolation
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void setNetworkTimeout(Executor executor, int milliseconds) throws JdbcApiSqlException, SQLFeatureNotSupportedException
DrillConnection
Normally, just throws SQLFeatureNotSupportedException
unless
request is trivially for no timeout (zero milliseconds
value).
setNetworkTimeout
in interface Connection
setNetworkTimeout
in interface DrillConnection
setNetworkTimeout
in class org.apache.calcite.avatica.AvaticaConnection
AlreadyClosedSqlException
- if connection is closedJdbcApiSqlException
- if an invalid parameter value is detected (and not above case)SQLFeatureNotSupportedException
- if timeout is non-zero (and not above case)public int getNetworkTimeout() throws AlreadyClosedSqlException
DrillConnection
getNetworkTimeout
in interface Connection
getNetworkTimeout
in interface DrillConnection
getNetworkTimeout
in class org.apache.calcite.avatica.AvaticaConnection
AlreadyClosedSqlException
- if connection is closedpublic DrillStatementImpl createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement
in interface Connection
createStatement
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public TimeZone getTimeZone()
getTimeZone
in class org.apache.calcite.avatica.AvaticaConnection
public CallableStatement prepareCall(String sql) throws SQLException
prepareCall
in interface Connection
prepareCall
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public String nativeSQL(String sql) throws SQLException
nativeSQL
in interface Connection
nativeSQL
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall
in interface Connection
prepareCall
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap
in interface Connection
getTypeMap
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap
in interface Connection
setTypeMap
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall
in interface Connection
prepareCall
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement
in interface Connection
prepareStatement
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement
in interface Connection
prepareStatement
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement
in interface Connection
prepareStatement
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public Clob createClob() throws SQLException
createClob
in interface Connection
createClob
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public Blob createBlob() throws SQLException
createBlob
in interface Connection
createBlob
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public NClob createNClob() throws SQLException
createNClob
in interface Connection
createNClob
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public SQLXML createSQLXML() throws SQLException
createSQLXML
in interface Connection
createSQLXML
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public boolean isValid(int timeout) throws SQLException
isValid
in interface Connection
isValid
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo
in interface Connection
setClientInfo
in class org.apache.calcite.avatica.AvaticaConnection
SQLClientInfoException
public void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo
in interface Connection
setClientInfo
in class org.apache.calcite.avatica.AvaticaConnection
SQLClientInfoException
public Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct
in interface Connection
createStruct
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void setSchema(String schema) throws SQLException
setSchema
in interface Connection
setSchema
in interface DrillConnection
setSchema
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public String getSchema() throws SQLException
getSchema
in interface Connection
getSchema
in interface DrillConnection
getSchema
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void abort(Executor executor) throws SQLException
abort
in interface Connection
abort
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
public void close() throws SQLException
close
in interface AutoCloseable
close
in interface Connection
close
in class org.apache.calcite.avatica.AvaticaConnection
SQLException
protected Drillbit getDrillbit()
Copyright © 1970 The Apache Software Foundation. All rights reserved.