com.taosdata.jdbc.ws

## Class WSStatement

- java.lang.Object
- - com.taosdata.jdbc.WrapperImpl
  - - com.taosdata.jdbc.AbstractStatement
    - - com.taosdata.jdbc.ws.WSStatement

All Implemented Interfaces:
  AutoCloseable, Statement, Wrapper

Direct Known Subclasses:
  AbsWSPreparedStatement

    public class WSStatement
    extends AbstractStatement

### Field Summary

Fields
`protected AtomicBoolean` `closed`
`protected String` `database`
`protected ResultSet` `resultSet`
`protected Transport` `transport`
`protected ZoneId` `zoneId`

### Fields inherited from class com.taosdata.jdbc.AbstractStatement

`affectedRows, batchedArgs, instanceId`

### 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`

### Constructor Summary

Constructors
Constructor and Description
`WSStatement(Transport transport, String database, AbstractConnection connection, Long instanceId, ZoneId zoneId)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`boolean` `execute(String sql)`
`boolean` `execute(String sql, Long reqId)`
`ResultSet` `executeQuery(String sql)`
`ResultSet` `executeQuery(String sql, Long reqId)`
`int` `executeUpdate(String sql)`
`int` `executeUpdate(String sql, Long reqId)`
`Connection` `getConnection()`
`int` `getQueryTimeout()`
`ResultSet` `getResultSet()`
`int` `getUpdateCount()`
`boolean` `isClosed()`
`void` `setQueryTimeout(int seconds)`

### Methods inherited from class com.taosdata.jdbc.AbstractStatement

`addBatch, cancel, clearBatch, clearWarnings, closeOnCompletion, execute, execute, execute, executeBatch, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getInstanceId, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable`

### Methods inherited from class com.taosdata.jdbc.WrapperImpl

`isWrapperFor, unwrap`

### 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`

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

`isWrapperFor, unwrap`

### Field Detail

#### transport

    protected Transport transport

#### database

    protected String database

#### closed

    protected AtomicBoolean closed

#### resultSet

    protected ResultSet resultSet

#### zoneId

    protected final ZoneId zoneId

### Constructor Detail

#### WSStatement

    public WSStatement(Transport transport,
                       String database,
                       AbstractConnection connection,
                       Long instanceId,
                       ZoneId zoneId)

### Method Detail

#### executeQuery

    public ResultSet executeQuery(String sql)
                           throws SQLException

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

#### executeQuery

    public ResultSet executeQuery(String sql,
                                  Long reqId)
                           throws SQLException

Specified by:
  `executeQuery` in class `AbstractStatement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate(String sql)
                      throws SQLException

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

#### executeUpdate

    public int executeUpdate(String sql,
                             Long reqId)
                      throws SQLException

Specified by:
  `executeUpdate` in class `AbstractStatement`
Throws:
  `SQLException`

#### close

    public void close()
               throws SQLException

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

#### execute

    public boolean execute(String sql)
                    throws SQLException

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

#### execute

    public boolean execute(String sql,
                           Long reqId)
                    throws SQLException

Specified by:
  `execute` in class `AbstractStatement`
Throws:
  `SQLException`

#### getQueryTimeout

    public int getQueryTimeout()
                        throws SQLException

Specified by:
  `getQueryTimeout` in interface `Statement`
Overrides:
  `getQueryTimeout` in class `AbstractStatement`
Throws:
  `SQLException`

#### setQueryTimeout

    public void setQueryTimeout(int seconds)
                         throws SQLException

Specified by:
  `setQueryTimeout` in interface `Statement`
Overrides:
  `setQueryTimeout` in class `AbstractStatement`
Throws:
  `SQLException`

#### getResultSet

    public ResultSet getResultSet()
                           throws SQLException

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

#### getUpdateCount

    public int getUpdateCount()
                       throws SQLException

Specified by:
  `getUpdateCount` in interface `Statement`
Specified by:
  `getUpdateCount` in class `AbstractStatement`
Throws:
  `SQLException`

#### getConnection

    public Connection getConnection()
                             throws SQLException

Specified by:
  `getConnection` in interface `Statement`
Specified by:
  `getConnection` in class `AbstractStatement`
Throws:
  `SQLException`

#### isClosed

    public boolean isClosed()
                     throws SQLException

Specified by:
  `isClosed` in interface `Statement`
Specified by:
  `isClosed` in class `AbstractStatement`
Throws:
  `SQLException`