Interface IDatabricksResultSet

All Superinterfaces:
AutoCloseable, ResultSet, Wrapper
All Known Implementing Classes:
DatabricksResultSet, EmptyResultSet

public interface IDatabricksResultSet extends ResultSet
Extends the standard JDBC ResultSet interface to provide Databricks-specific functionality. This interface adds support for complex data types like Structs and Maps, as well as methods to retrieve statement status and execution information.
  • Method Details

    • getStruct

      Struct getStruct(String columnLabel) throws SQLException
      Retrieves the SQL `Struct` from the specified column using its label.
      Parameters:
      columnLabel - the label for the column specified in the SQL query
      Returns:
      a `Struct` object if the column contains a struct; `null` if the value is SQL `NULL`
      Throws:
      SQLException - if the column is not of `STRUCT` type or if any SQL error occurs
    • getMap

      Map<String,Object> getMap(String columnLabel) throws SQLException
      Retrieves the SQL `Map` from the specified column using its label.
      Parameters:
      columnLabel - the label for the column specified in the SQL query
      Returns:
      a `Mapinvalid input: '<'String, Object>` if the column contains a map; `null` if the value is SQL `NULL`
      Throws:
      SQLException - if the column is not of `MAP` type or if any SQL error occurs
    • getStatementId

      String getStatementId()
      Retrieves the unique identifier of the statement associated with this result set.
      Returns:
      A string representing the statement ID
    • getStatementStatus

      @Deprecated StatementStatus getStatementStatus()
      Deprecated.
      Retrieves the current status of the statement associated with this result set. This can be used to monitor the execution progress and state of the statement.
      Returns:
      The current StatementStatus of the statement
    • getExecutionStatus

      IExecutionStatus getExecutionStatus()
      Retrieves the current status of the statement associated with this result set. This can be used to monitor the execution progress and state of the statement.
      Returns:
      The current StatementStatus of the statement
    • getUpdateCount

      long getUpdateCount() throws SQLException
      Retrieves the number of rows affected by the SQL statement. For SELECT statements or statements that don't modify data, this will return 0.
      Returns:
      The number of rows affected by INSERT, UPDATE, or DELETE statements
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed result set
    • hasUpdateCount

      boolean hasUpdateCount() throws SQLException
      Checks whether the executed SQL statement has produced an update count. This is typically true for DML (Data Manipulation Language) statements like INSERT, UPDATE, or DELETE.
      Returns:
      true if the statement has produced an update count, false otherwise
      Throws:
      SQLException - if a database access error occurs or this method is called on a closed result set
    • getMap

      Map<String,Object> getMap(int columnIndex) throws SQLException
      Retrieves the SQL `Map` from the specified column index in the result set.
      Parameters:
      columnIndex - the index of the column in the result set (1-based)
      Returns:
      a `Mapinvalid input: '<'String, Object>` if the column contains a map; `null` if the value is SQL `NULL`
      Throws:
      SQLException - if the column is not of `MAP` type or if any SQL error occurs
    • getStruct

      Struct getStruct(int columnIndex) throws SQLException
      Retrieves the SQL `Struct` from the specified column index in the result set.
      Parameters:
      columnIndex - the index of the column in the result set (1-based)
      Returns:
      a `Struct` object if the column contains a struct; `null` if the value is SQL `NULL`
      Throws:
      SQLException - if the column is not of `STRUCT` type or if any SQL error occurs