Package com.databricks.jdbc.api

## Interface IDatabricksStatement

All Superinterfaces:
  `AutoCloseable`, `Statement`, `Wrapper`

All Known Implementing Classes:
  `DatabricksPreparedStatement`, `DatabricksStatement`

    public interface IDatabricksStatement
    extends Statement

Extends the standard JDBC `Statement` interface to provide Databricks-specific functionality. This interface adds support for asynchronous query execution and result retrieval, allowing for better handling of long-running queries and improved performance in distributed environments.

### Field Summary

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

All Methods Instance Methods Abstract Methods
`ResultSet` `executeAsync​(String sql)` Executes the given SQL command asynchronously and returns a lightweight result set handle.
`ResultSet` `getExecutionResult()` Retrieves the result set for a previously executed statement.

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

`addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout`

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

`isWrapperFor, unwrap`

### Method Detail

#### executeAsync

    ResultSet executeAsync​(String sql)
                    throws SQLException

Executes the given SQL command asynchronously and returns a lightweight result set handle. This method initiates the execution but does not wait for it to complete, making it suitable for long-running queries. The actual results can be retrieved later using `getExecutionResult()`.

Parameters:
  `sql` - The SQL command to be executed
Returns:
  A `ResultSet` handle that can be used to track and retrieve the results
Throws:
  `SQLException` - if a database access error occurs, this method is called on a closed statement, or the SQL command is not valid

#### getExecutionResult

    ResultSet getExecutionResult()
                          throws SQLException

Retrieves the result set for a previously executed statement. This method should be called after executing a statement using `executeAsync(String)` to get the actual results.

Returns:
  A `ResultSet` containing the results of the statement execution in case of successful completion, else handle for the result status.
Throws:
  `SQLException` - if the statement was never executed, has been closed, or if a database access error occurs