Package net.snowflake.client.jdbc
Interface SnowflakeResultSet
-
- All Known Implementing Classes:
SFAsyncResultSet
,SnowflakeResultSetV1
public interface SnowflakeResultSet
This interface defines Snowflake specific APIs for ResultSet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getQueryErrorMessage()
This function retrieves the error message recorded from the error status of an asynchronous query.String
getQueryID()
List<SnowflakeResultSetSerializable>
getResultSetSerializables(long maxSizeInBytes)
Get a list of ResultSetSerializables for the ResultSet in order to parallel processingQueryStatus
getStatus()
This function retrieves the status of an asynchronous query.QueryStatusV2
getStatusV2()
This function retrieves the status of an asynchronous query.
-
-
-
Method Detail
-
getQueryID
String getQueryID() throws SQLException
- Returns:
- the Snowflake query ID of the query which generated this result set
- Throws:
SQLException
- if an error is encountered
-
getStatus
QueryStatus getStatus() throws SQLException
This function retrieves the status of an asynchronous query. An empty ResultSet object has already been returned but the query may still be running. This function can be used to poll to see if it is possible to retrieve results from the ResultSet yet. See Client/src/main/java/net/snowflake/client/core/QueryStatus.java for the list of all possible query statuses. QueryStatus = SUCCESS means results can be retrieved.- Returns:
- QueryStatus enum showing status of query
- Throws:
SQLException
- if an error is encountered
-
getQueryErrorMessage
String getQueryErrorMessage() throws SQLException
This function retrieves the error message recorded from the error status of an asynchronous query. If there is no error or no error is returned by the server, an empty string will be returned.- Returns:
- String value of query's error message
- Throws:
SQLException
- if an error is encountered
-
getStatusV2
QueryStatusV2 getStatusV2() throws SQLException
This function retrieves the status of an asynchronous query. An empty ResultSet object has already been returned, but the query may still be running. This function can be used to query whether it is possible to retrieve results from the ResultSet already.status.isSuccess()
means that results can be retrieved.- Returns:
- an instance containing query metadata
- Throws:
SQLException
- if an error is encountered
-
getResultSetSerializables
List<SnowflakeResultSetSerializable> getResultSetSerializables(long maxSizeInBytes) throws SQLException
Get a list of ResultSetSerializables for the ResultSet in order to parallel processing- Parameters:
maxSizeInBytes
- The expected max data size wrapped in the ResultSetSerializables object. NOTE: this parameter is intended to make the data size in each serializable object to be less than it. But if user specifies a small value which may be smaller than the data size of one result chunk. So the definition can't be guaranteed completely. For this special case, one serializable object is used to wrap the data chunk.- Returns:
- a list of ResultSetSerializables
- Throws:
SQLException
- if fails to get the ResultSetSerializable objects.
-
-