Interface SFConnectionHandler

  • All Known Implementing Classes:
    DefaultSFConnectionHandler

    public interface SFConnectionHandler
    Class that presents the implementation of a Snowflake Connection. This allows for alternate definitions of SFSession, SFStatement, and SFResultSet, (representing the 'physical' implementation layer) that can share high-level code.
    • Method Detail

      • supportsAsyncQuery

        boolean supportsAsyncQuery()
        Returns:
        Whether this Connection supports asynchronous queries. If yes, createAsyncResultSet may be called.
      • initializeConnection

        void initializeConnection​(String url,
                                  Properties info)
                           throws SQLException
        Initializes the SnowflakeConnection
        Parameters:
        url - url string
        info - connection parameters
        Throws:
        SQLException - if any error is encountered
      • getSFSession

        SFBaseSession getSFSession()
        Returns:
        Gets the SFBaseSession implementation for this connection implementation
      • getSFStatement

        SFBaseStatement getSFStatement()
                                throws SQLException
        Returns:
        Returns the SFStatementInterface implementation for this connection implementation
        Throws:
        SQLException - if any error occurs
      • createResultSet

        ResultSet createResultSet​(String queryID,
                                  Statement statement)
                           throws SQLException
        Creates a result set from a query id.
        Parameters:
        queryID - the query ID
        statement - Statement object
        Returns:
        ResultSet
        Throws:
        SQLException - if any error occurs
      • createAsyncResultSet

        SnowflakeBaseResultSet createAsyncResultSet​(SFBaseResultSet resultSet,
                                                    Statement statement)
                                             throws SQLException
        Creates an asynchronous result set from a base SFBaseResultSet for this connection implementation.
        Parameters:
        resultSet - SFBaseResultSet
        statement - Statement
        Returns:
        An asynchronous result set from SFBaseResultSet
        Throws:
        SQLException - if an error occurs
      • getBindStageName

        default String getBindStageName()
        Overridable method that allows for different connection implementations to use different stage names for binds uploads. By default, it uses SYSTEM$BIND
        Returns:
        The name of the identifier with which a temporary stage is created in the Session for uploading array bind values.