Package org.apache.drill.jdbc

# Interface DrillConnection

All Superinterfaces:
  `AutoCloseable`, `Connection`, `Wrapper`

public interface DrillConnection extends Connection
Drill-specific `Connection`.

See Also:
  - `unwrap(java.lang.Class<T>)`

## Field Summary

### Fields inherited from interface java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

## Method Summary

Modifier and Type
Method
Description
`void`
`commit()`
Drill: Not supported.
`boolean`
`getAutoCommit()`
`DrillClient`
`getClient()`
`DrillConnectionConfig`
`getConfig()`
Returns a view onto this connection's configuration properties.
`int`
`getNetworkTimeout()`
Drill: Returns zero.
`String`
`getSchema()`
`int`
`getTransactionIsolation()`
`boolean`
`isClosed()`
`boolean`
`isWrapperFor(Class<?> iface)`
`void`
`releaseSavepoint(Savepoint savepoint)`
Drill: Not supported.
`void`
`rollback()`
Drill: Not supported.
`void`
`rollback(Savepoint savepoint)`
Drill: Not supported.
`void`
`setAutoCommit(boolean autoCommit)`
`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)`
`<T> T`
`unwrap(Class<T> iface)`

### Methods inherited from interface java.sql.Connection

`abort, beginRequest, clearWarnings, close, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTypeMap, getWarnings, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTypeMap`

## Method Details

### unwrap

<T> T unwrap(Class<T> iface) throws SQLException

Drill: Accepts `DrillConnection.class`.

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`

### isWrapperFor

boolean isWrapperFor(Class<?> iface) throws SQLException

Drill: Returns true for `DrillConnection.class`.

Specified by:
  `isWrapperFor` in interface `Wrapper`
Throws:
  `SQLException`

### setAutoCommit

void setAutoCommit(boolean autoCommit) throws SQLFeatureNotSupportedException, SQLException

Drill: Accepts only `true`.

Specified by:
  `setAutoCommit` in interface `Connection`
Throws:
  `SQLFeatureNotSupportedException` - if called with `false`
  `SQLException`

### getAutoCommit

boolean getAutoCommit() throws SQLException

Drill: Always returns `true`.

Specified by:
  `getAutoCommit` in interface `Connection`
Throws:
  `SQLException`

### commit

void commit() throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `commit` in interface `Connection`
Throws:
  `SQLException`

### rollback

void rollback() throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `rollback` in interface `Connection`
Throws:
  `SQLException`

### isClosed

boolean isClosed()

Drill: Does not throw SQLException.

Specified by:
  `isClosed` in interface `Connection`

### setTransactionIsolation

void setTransactionIsolation(int level) throws SQLFeatureNotSupportedException, SQLException

Drill: Accepts only `Connection.TRANSACTION_NONE`.

Specified by:
  `setTransactionIsolation` in interface `Connection`
Throws:
  `SQLFeatureNotSupportedException` - if `level` is not `Connection.TRANSACTION_NONE`.
  `SQLException`

### getTransactionIsolation

int getTransactionIsolation() throws SQLException

Drill: Always returns `Connection.TRANSACTION_NONE`.

Specified by:
  `getTransactionIsolation` in interface `Connection`
Throws:
  `SQLException`

### setSavepoint

Savepoint setSavepoint() throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `setSavepoint` in interface `Connection`
Throws:
  `SQLException`

### setSavepoint

Savepoint setSavepoint(String name) throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `setSavepoint` in interface `Connection`
Throws:
  `SQLException`

### rollback

void rollback(Savepoint savepoint) throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `rollback` in interface `Connection`
Throws:
  `SQLException`

### releaseSavepoint

void releaseSavepoint(Savepoint savepoint) throws SQLException
Drill: Not supported. Always throws `SQLFeatureNotSupportedException` (or `AlreadyClosedSqlException`).

Specified by:
  `releaseSavepoint` in interface `Connection`
Throws:
  `SQLException`

### setSchema

void setSchema(String schema) throws SQLException

Specified by:
  `setSchema` in interface `Connection`
Throws:
  `SQLException`

### getSchema

String getSchema() throws SQLException

Specified by:
  `getSchema` in interface `Connection`
Throws:
  `SQLException`

### setNetworkTimeout

void setNetworkTimeout(Executor executor, int milliseconds) throws AlreadyClosedSqlException, JdbcApiSqlException, SQLFeatureNotSupportedException
Drill: Not supported (for non-zero timeout value).

Normally, just throws `SQLFeatureNotSupportedException` unless request is trivially for no timeout (zero `milliseconds` value).

Specified by:
  `setNetworkTimeout` in interface `Connection`
Throws:
  `AlreadyClosedSqlException` - if connection is closed
  `JdbcApiSqlException` - if an invalid parameter value is detected (and not above case)
  `SQLFeatureNotSupportedException` - if timeout is non-zero (and not above case)

### getNetworkTimeout

int getNetworkTimeout() throws AlreadyClosedSqlException
Drill: Returns zero.

Specified by:
  `getNetworkTimeout` in interface `Connection`
Throws:
  `AlreadyClosedSqlException` - if connection is closed

### getConfig

DrillConnectionConfig getConfig()
Returns a view onto this connection's configuration properties. Code within Optiq should use this view rather than calling `Properties.getProperty(String)`.

### getClient

DrillClient getClient()