Interface IDatabricksResultSet
- All Superinterfaces:
AutoCloseable,ResultSet,Wrapper
- All Known Implementing Classes:
DatabricksResultSet,EmptyResultSet
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.-
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current status of the statement associated with this result set.getMap(int columnIndex) Retrieves the SQL `Map` from the specified column index in the result set.Retrieves the SQL `Map` from the specified column using its label.Retrieves the unique identifier of the statement associated with this result set.Deprecated.getStruct(int columnIndex) Retrieves the SQL `Struct` from the specified column index in the result set.Retrieves the SQL `Struct` from the specified column using its label.longRetrieves the number of rows affected by the SQL statement.booleanChecks whether the executed SQL statement has produced an update count.Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getStruct
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
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.UsegetExecutionStatus()instead.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
StatementStatusof 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
StatementStatusof the statement
-
getUpdateCount
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
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
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
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
-
getExecutionStatus()instead.