Package com.salesforce.datacloud.jdbc.core

## Class DataCloudStatement

- java.lang.Object
- - com.salesforce.datacloud.jdbc.core.DataCloudStatement

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

Direct Known Subclasses:
  `DataCloudPreparedStatement`

    public class DataCloudStatement
    extends Object
    implements Statement

### Field Summary

Fields
`protected static String` `BATCH_EXECUTION_IS_NOT_SUPPORTED`
`protected DataCloudConnection` `dataCloudConnection`
`static int` `DEFAULT_QUERY_TIMEOUT`
`protected QueryStatusListener` `listener`
`protected static String` `NOT_SUPPORTED_IN_DATACLOUD_QUERY`
`protected ResultSet` `resultSet`

### 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
`DataCloudStatement​(@NonNull DataCloudConnection connection)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addBatch​(String sql)`
`void` `cancel()`
`void` `clearBatch()`
`void` `clearWarnings()`
`void` `close()`
`void` `closeOnCompletion()`
`boolean` `execute​(String sql)`
`boolean` `execute​(String sql, int autoGeneratedKeys)`
`boolean` `execute​(String sql, int[] columnIndexes)`
`boolean` `execute​(String sql, String[] columnNames)`
`DataCloudResultSet` `executeAdaptiveQuery​(String sql)`
`protected DataCloudResultSet` `executeAdaptiveQuery​(String sql, HyperGrpcClientExecutor client, Duration timeout)`
`DataCloudStatement` `executeAsyncQuery​(String sql)`
`protected DataCloudStatement` `executeAsyncQuery​(String sql, HyperGrpcClientExecutor client)`
`int[]` `executeBatch()`
`ResultSet` `executeQuery​(String sql)`
`DataCloudResultSet` `executeSyncQuery​(String sql)`
`protected DataCloudResultSet` `executeSyncQuery​(String sql, HyperGrpcClientExecutor client)`
`int` `executeUpdate​(String sql)`
`int` `executeUpdate​(String sql, int autoGeneratedKeys)`
`int` `executeUpdate​(String sql, int[] columnIndexes)`
`int` `executeUpdate​(String sql, String[] columnNames)`
`Connection` `getConnection()`
`int` `getFetchDirection()`
`int` `getFetchSize()`
`ResultSet` `getGeneratedKeys()`
`int` `getMaxFieldSize()`
`int` `getMaxRows()`
`boolean` `getMoreResults()`
`boolean` `getMoreResults​(int current)`
`protected HyperGrpcClientExecutor` `getQueryExecutor()`
`protected HyperGrpcClientExecutor` `getQueryExecutor​(QueryParam additionalQueryParams)`
`int` `getQueryTimeout()`
`ResultSet` `getResultSet()`
`int` `getResultSetConcurrency()`
`int` `getResultSetHoldability()`
`int` `getResultSetType()`
`int` `getUpdateCount()`
`SQLWarning` `getWarnings()`
`boolean` `isClosed()`
`boolean` `isCloseOnCompletion()`
`boolean` `isPoolable()`
`boolean` `isReady()`
`boolean` `isWrapperFor​(Class<?> iFace)`
`void` `setCursorName​(String name)`
`void` `setEscapeProcessing​(boolean enable)`
`void` `setFetchDirection​(int direction)`
`void` `setFetchSize​(int rows)`
`void` `setMaxFieldSize​(int max)`
`void` `setMaxRows​(int max)`
`void` `setPoolable​(boolean poolable)`
`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

`enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows`

### Field Detail

#### resultSet

    protected ResultSet resultSet

#### NOT_SUPPORTED_IN_DATACLOUD_QUERY

    protected static final String NOT_SUPPORTED_IN_DATACLOUD_QUERY

See Also:
  Constant Field Values

#### BATCH_EXECUTION_IS_NOT_SUPPORTED

    protected static final String BATCH_EXECUTION_IS_NOT_SUPPORTED

See Also:
  Constant Field Values

#### DEFAULT_QUERY_TIMEOUT

    public static final int DEFAULT_QUERY_TIMEOUT

See Also:
  Constant Field Values

#### dataCloudConnection

    protected final DataCloudConnection dataCloudConnection

#### listener

    protected QueryStatusListener listener

### Constructor Detail

#### DataCloudStatement

    public DataCloudStatement​(@NonNull
                              @NonNull DataCloudConnection connection)

### Method Detail

#### getQueryExecutor

    protected HyperGrpcClientExecutor getQueryExecutor()

#### getQueryExecutor

    protected HyperGrpcClientExecutor getQueryExecutor​(QueryParam additionalQueryParams)

#### isReady

    public boolean isReady()

#### execute

    public boolean execute​(String sql)
                    throws SQLException

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

#### executeQuery

    public ResultSet executeQuery​(String sql)
                           throws SQLException

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

#### executeSyncQuery

    public DataCloudResultSet executeSyncQuery​(String sql)
                                        throws SQLException

Throws:
  `SQLException`

#### executeSyncQuery

    protected DataCloudResultSet executeSyncQuery​(String sql,
                                                  HyperGrpcClientExecutor client)
                                           throws SQLException

Throws:
  `SQLException`

#### executeAdaptiveQuery

    public DataCloudResultSet executeAdaptiveQuery​(String sql)
                                            throws SQLException

Throws:
  `SQLException`

#### executeAdaptiveQuery

    protected DataCloudResultSet executeAdaptiveQuery​(String sql,
                                                      HyperGrpcClientExecutor client,
                                                      Duration timeout)
                                               throws SQLException

Throws:
  `SQLException`

#### executeAsyncQuery

    public DataCloudStatement executeAsyncQuery​(String sql)
                                         throws SQLException

Throws:
  `SQLException`

#### executeAsyncQuery

    protected DataCloudStatement executeAsyncQuery​(String sql,
                                                   HyperGrpcClientExecutor client)
                                            throws SQLException

Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql)
                      throws SQLException

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

#### close

    public void close()
               throws SQLException

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

#### getMaxFieldSize

    public int getMaxFieldSize()

Specified by:
  `getMaxFieldSize` in interface `Statement`

#### setMaxFieldSize

    public void setMaxFieldSize​(int max)

Specified by:
  `setMaxFieldSize` in interface `Statement`

#### getMaxRows

    public int getMaxRows()

Specified by:
  `getMaxRows` in interface `Statement`

#### setMaxRows

    public void setMaxRows​(int max)

Specified by:
  `setMaxRows` in interface `Statement`

#### setEscapeProcessing

    public void setEscapeProcessing​(boolean enable)

Specified by:
  `setEscapeProcessing` in interface `Statement`

#### getQueryTimeout

    public int getQueryTimeout()

Specified by:
  `getQueryTimeout` in interface `Statement`

#### setQueryTimeout

    public void setQueryTimeout​(int seconds)

Specified by:
  `setQueryTimeout` in interface `Statement`

#### cancel

    public void cancel()

Specified by:
  `cancel` in interface `Statement`

#### getWarnings

    public SQLWarning getWarnings()

Specified by:
  `getWarnings` in interface `Statement`

#### clearWarnings

    public void clearWarnings()

Specified by:
  `clearWarnings` in interface `Statement`

#### setCursorName

    public void setCursorName​(String name)

Specified by:
  `setCursorName` in interface `Statement`

#### getResultSet

    public ResultSet getResultSet()
                           throws SQLException

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

#### getUpdateCount

    public int getUpdateCount()

Specified by:
  `getUpdateCount` in interface `Statement`

#### getMoreResults

    public boolean getMoreResults()

Specified by:
  `getMoreResults` in interface `Statement`

#### setFetchDirection

    public void setFetchDirection​(int direction)

Specified by:
  `setFetchDirection` in interface `Statement`

#### getFetchDirection

    public int getFetchDirection()

Specified by:
  `getFetchDirection` in interface `Statement`

#### setFetchSize

    public void setFetchSize​(int rows)

Specified by:
  `setFetchSize` in interface `Statement`

#### getFetchSize

    public int getFetchSize()

Specified by:
  `getFetchSize` in interface `Statement`

#### getResultSetConcurrency

    public int getResultSetConcurrency()

Specified by:
  `getResultSetConcurrency` in interface `Statement`

#### getResultSetType

    public int getResultSetType()

Specified by:
  `getResultSetType` in interface `Statement`

#### addBatch

    public void addBatch​(String sql)
                  throws SQLException

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

#### clearBatch

    public void clearBatch()
                    throws SQLException

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

#### executeBatch

    public int[] executeBatch()
                       throws SQLException

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

#### getConnection

    public Connection getConnection()

Specified by:
  `getConnection` in interface `Statement`

#### getMoreResults

    public boolean getMoreResults​(int current)

Specified by:
  `getMoreResults` in interface `Statement`

#### getGeneratedKeys

    public ResultSet getGeneratedKeys()

Specified by:
  `getGeneratedKeys` in interface `Statement`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int autoGeneratedKeys)
                      throws SQLException

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

#### executeUpdate

    public int executeUpdate​(String sql,
                             int[] columnIndexes)
                      throws SQLException

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

#### executeUpdate

    public int executeUpdate​(String sql,
                             String[] columnNames)
                      throws SQLException

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

#### execute

    public boolean execute​(String sql,
                           int autoGeneratedKeys)
                    throws SQLException

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

#### execute

    public boolean execute​(String sql,
                           int[] columnIndexes)
                    throws SQLException

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

#### execute

    public boolean execute​(String sql,
                           String[] columnNames)
                    throws SQLException

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

#### getResultSetHoldability

    public int getResultSetHoldability()

Specified by:
  `getResultSetHoldability` in interface `Statement`

#### isClosed

    public boolean isClosed()

Specified by:
  `isClosed` in interface `Statement`

#### setPoolable

    public void setPoolable​(boolean poolable)

Specified by:
  `setPoolable` in interface `Statement`

#### isPoolable

    public boolean isPoolable()

Specified by:
  `isPoolable` in interface `Statement`

#### closeOnCompletion

    public void closeOnCompletion()

Specified by:
  `closeOnCompletion` in interface `Statement`

#### isCloseOnCompletion

    public boolean isCloseOnCompletion()

Specified by:
  `isCloseOnCompletion` in interface `Statement`

#### unwrap

    public <T> T unwrap​(Class<T> iFace)
                 throws SQLException

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

#### isWrapperFor

    public boolean isWrapperFor​(Class<?> iFace)

Specified by:
  `isWrapperFor` in interface `Wrapper`