Package org.apache.iotdb.jdbc

# Class IoTDBStatement

java.lang.Object
org.apache.iotdb.jdbc.IoTDBStatement

All Implemented Interfaces:
  `AutoCloseable`, `Statement`, `Wrapper`

Direct Known Subclasses:
  `IoTDBPreparedStatement`

public class IoTDBStatement extends Object implements Statement

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final Charset`
`charset`
`protected IClientRPCService.Iface`
`client`
`protected final ZoneId`
`zoneId`

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

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

## Method Summary

Modifier and Type
Method
Description
`void`
`addBatch(String sql)`
`void`
`cancel()`
`void`
`clearBatch()`
`void`
`clearWarnings()`
`void`
`close()`
`void`
`closeOnCompletion()`
`boolean`
`execute(byte[] sql)`
Execute a SQL encoded in bytes with `charset`.
`boolean`
`execute(String sql)`
`boolean`
`execute(String arg0, int arg1)`
`boolean`
`execute(String arg0, int[] arg1)`
`boolean`
`execute(String arg0, String[] arg1)`
`int[]`
`executeBatch()`
`ResultSet`
`executeQuery(String sql)`
`ResultSet`
`executeQuery(String sql, long timeoutInMS)`
`int`
`executeUpdate(String sql)`
`int`
`executeUpdate(String arg0, int arg1)`
`int`
`executeUpdate(String arg0, int[] arg1)`
`int`
`executeUpdate(String arg0, String[] arg1)`
`Connection`
`getConnection()`
`int`
`getFetchDirection()`
`int`
`getFetchSize()`
`ResultSet`
`getGeneratedKeys()`
`int`
`getMaxFieldSize()`
`int`
`getMaxRows()`
`long`
`getMilliSecond(long time)`
`boolean`
`getMoreResults()`
`boolean`
`getMoreResults(int arg0)`
`int`
`getNanoSecond(long time)`
`int`
`getQueryTimeout()`
`ResultSet`
`getResultSet()`
`int`
`getResultSetConcurrency()`
`int`
`getResultSetHoldability()`
`int`
`getResultSetType()`
`long`
`getSessionId()`
`String`
`getSqlDialect()`
`long`
`getStmtId()`
`int`
`getTimeFactor()`
`int`
`getUpdateCount()`
`SQLWarning`
`getWarnings()`
`boolean`
`isClosed()`
`boolean`
`isCloseOnCompletion()`
`boolean`
`isPoolable()`
`boolean`
`isWrapperFor(Class<?> iface)`
`void`
`setCursorName(String arg0)`
`void`
`setEscapeProcessing(boolean enable)`
`void`
`setFetchDirection(int direction)`
`void`
`setFetchSize(int fetchSize)`
`void`
`setMaxFieldSize(int arg0)`
`void`
`setMaxRows(int num)`
`void`
`setPoolable(boolean arg0)`
`void`
`setQueryTimeout(int seconds)`
`<T> T`
`unwrap(Class<T> iface)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

`executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, setLargeMaxRows`

## Field Details

### zoneId

protected final ZoneId zoneId

### charset

protected final Charset charset

### client

protected IClientRPCService.Iface client

## Method Details

### isWrapperFor

public boolean isWrapperFor(Class<?> iface)

Specified by:
  `isWrapperFor` in interface `Wrapper`

### unwrap

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

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

### addBatch

public void addBatch(String sql)

Specified by:
  `addBatch` in interface `Statement`

### cancel

public void cancel() throws SQLException

Specified by:
  `cancel` in interface `Statement`
Throws:
  `SQLException`

### clearBatch

public void clearBatch()

Specified by:
  `clearBatch` in interface `Statement`

### clearWarnings

public void clearWarnings()

Specified by:
  `clearWarnings` in interface `Statement`

### close

public void close() throws SQLException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Statement`
Throws:
  `SQLException`

### closeOnCompletion

public void closeOnCompletion() throws SQLException

Specified by:
  `closeOnCompletion` in interface `Statement`
Throws:
  `SQLException`

### execute

public boolean execute(byte[] sql) throws SQLException
Execute a SQL encoded in bytes with `charset`.

Parameters:
  `sql` - raw sql in bytes encoded with `charset`
Returns:
  true if the first result is a `ResultSet` object; false if the first result is an update count or there is no result
Throws:
  `SQLException` - if a database access error occurs

### execute

public boolean execute(String sql) throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

### execute

public boolean execute(String arg0, int arg1) throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

### execute

public boolean execute(String arg0, int[] arg1) throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

### execute

public boolean execute(String arg0, String[] arg1) throws SQLException

Specified by:
  `execute` in interface `Statement`
Throws:
  `SQLException`

### executeBatch

public int[] executeBatch() throws SQLException

Specified by:
  `executeBatch` in interface `Statement`
Throws:
  `SQLException`

### executeQuery

public ResultSet executeQuery(String sql) throws SQLException

Specified by:
  `executeQuery` in interface `Statement`
Throws:
  `SQLException`

### executeQuery

public ResultSet executeQuery(String sql, long timeoutInMS) throws SQLException

Throws:
  `SQLException`

### executeUpdate

public int executeUpdate(String sql) throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

### executeUpdate

public int executeUpdate(String arg0, int arg1) throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

### executeUpdate

public int executeUpdate(String arg0, int[] arg1) throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

### executeUpdate

public int executeUpdate(String arg0, String[] arg1) throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Throws:
  `SQLException`

### getConnection

public Connection getConnection()

Specified by:
  `getConnection` in interface `Statement`

### getFetchDirection

public int getFetchDirection() throws SQLException

Specified by:
  `getFetchDirection` in interface `Statement`
Throws:
  `SQLException`

### setFetchDirection

public void setFetchDirection(int direction) throws SQLException

Specified by:
  `setFetchDirection` in interface `Statement`
Throws:
  `SQLException`

### getFetchSize

public int getFetchSize() throws SQLException

Specified by:
  `getFetchSize` in interface `Statement`
Throws:
  `SQLException`

### setFetchSize

public void setFetchSize(int fetchSize) throws SQLException

Specified by:
  `setFetchSize` in interface `Statement`
Throws:
  `SQLException`

### getGeneratedKeys

public ResultSet getGeneratedKeys() throws SQLException

Specified by:
  `getGeneratedKeys` in interface `Statement`
Throws:
  `SQLException`

### getMaxFieldSize

public int getMaxFieldSize() throws SQLException

Specified by:
  `getMaxFieldSize` in interface `Statement`
Throws:
  `SQLException`

### setMaxFieldSize

public void setMaxFieldSize(int arg0) throws SQLException

Specified by:
  `setMaxFieldSize` in interface `Statement`
Throws:
  `SQLException`

### getMaxRows

public int getMaxRows() throws SQLException

Specified by:
  `getMaxRows` in interface `Statement`
Throws:
  `SQLException`

### setMaxRows

public void setMaxRows(int num) throws SQLException

Specified by:
  `setMaxRows` in interface `Statement`
Throws:
  `SQLException`

### getMoreResults

public boolean getMoreResults() throws SQLException

Specified by:
  `getMoreResults` in interface `Statement`
Throws:
  `SQLException`

### getMoreResults

public boolean getMoreResults(int arg0) throws SQLException

Specified by:
  `getMoreResults` in interface `Statement`
Throws:
  `SQLException`

### getQueryTimeout

public int getQueryTimeout()

Specified by:
  `getQueryTimeout` in interface `Statement`

### setQueryTimeout

public void setQueryTimeout(int seconds) throws SQLException

Specified by:
  `setQueryTimeout` in interface `Statement`
Throws:
  `SQLException`

### getResultSet

public ResultSet getResultSet() throws SQLException

Specified by:
  `getResultSet` in interface `Statement`
Throws:
  `SQLException`

### getResultSetConcurrency

public int getResultSetConcurrency() throws SQLException

Specified by:
  `getResultSetConcurrency` in interface `Statement`
Throws:
  `SQLException`

### getResultSetHoldability

public int getResultSetHoldability() throws SQLException

Specified by:
  `getResultSetHoldability` in interface `Statement`
Throws:
  `SQLException`

### getResultSetType

public int getResultSetType() throws SQLException

Specified by:
  `getResultSetType` in interface `Statement`
Throws:
  `SQLException`

### getUpdateCount

public int getUpdateCount()

Specified by:
  `getUpdateCount` in interface `Statement`

### getWarnings

public SQLWarning getWarnings()

Specified by:
  `getWarnings` in interface `Statement`

### isCloseOnCompletion

public boolean isCloseOnCompletion() throws SQLException

Specified by:
  `isCloseOnCompletion` in interface `Statement`
Throws:
  `SQLException`

### isClosed

public boolean isClosed()

Specified by:
  `isClosed` in interface `Statement`

### isPoolable

public boolean isPoolable() throws SQLException

Specified by:
  `isPoolable` in interface `Statement`
Throws:
  `SQLException`

### setPoolable

public void setPoolable(boolean arg0) throws SQLException

Specified by:
  `setPoolable` in interface `Statement`
Throws:
  `SQLException`

### setCursorName

public void setCursorName(String arg0) throws SQLException

Specified by:
  `setCursorName` in interface `Statement`
Throws:
  `SQLException`

### setEscapeProcessing

public void setEscapeProcessing(boolean enable) throws SQLException

Specified by:
  `setEscapeProcessing` in interface `Statement`
Throws:
  `SQLException`

### getSessionId

public long getSessionId()

### getStmtId

public long getStmtId()

### getMilliSecond

public long getMilliSecond(long time)

### getNanoSecond

public int getNanoSecond(long time)

### getTimeFactor

public int getTimeFactor()

### getSqlDialect

public String getSqlDialect()