Interface SnowflakeResultSet

  • All Known Subinterfaces:
    SnowflakeAsyncResultSet

    public interface SnowflakeResultSet
    This interface defines Snowflake specific APIs for ResultSet
    • 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
      • 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.
      • getArray

        <T> T[] getArray​(int columnIndex,
                         Class<T> type)
                  throws SQLException
        Get an array of elements from a structured type (ARRAY) column.

        This method is used to retrieve array elements with proper type conversion for Snowflake structured types.

        Type Parameters:
        T - the type of array elements
        Parameters:
        columnIndex - the column index (1-based)
        type - the class of array elements
        Returns:
        an array of elements, or null if the value was SQL NULL
        Throws:
        SQLException - if the column is not a structured type or conversion fails
      • getList

        <T> List<T> getList​(int columnIndex,
                            Class<T> type)
                     throws SQLException
        Get a list of elements from a structured type (ARRAY) column.

        This method is used to retrieve array elements as a List with proper type conversion for Snowflake structured types.

        Type Parameters:
        T - the type of list elements
        Parameters:
        columnIndex - the column index (1-based)
        type - the class of list elements
        Returns:
        a List of elements, or null if the value was SQL NULL
        Throws:
        SQLException - if the column is not a structured type or conversion fails
      • getMap

        <T> Map<String,​T> getMap​(int columnIndex,
                                       Class<T> type)
                                throws SQLException
        Get a map of key-value pairs from a structured type (MAP or OBJECT) column.

        This method is used to retrieve map entries with proper type conversion for Snowflake structured types.

        Type Parameters:
        T - the type of map values
        Parameters:
        columnIndex - the column index (1-based)
        type - the class of map values
        Returns:
        a Map of String keys to typed values, or null if the value was SQL NULL
        Throws:
        SQLException - if the column is not a structured type or conversion fails