net.snowflake.client.jdbc

## 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 Summary

All Methods Instance Methods Abstract Methods Default Methods
`SnowflakeBaseResultSet` `createAsyncResultSet(SFBaseResultSet resultSet, Statement statement)` Creates an asynchronous result set from a base SFBaseResultSet for this connection implementation.
`SnowflakeBaseResultSet` `createResultSet(SFBaseResultSet resultSet, Statement statement)` Creates a SnowflakeResultSet from a base SFBaseResultSet for this connection implementation.
`ResultSet` `createResultSet(String queryID, Statement statement)` Creates a result set from a query id.
`default String` `getBindStageName()` Overridable method that allows for different connection implementations to use different stage names for binds uploads.
`SFBaseFileTransferAgent` `getFileTransferAgent(String command, SFBaseStatement statement)`
`SFBaseSession` `getSFSession()` Gets the SFBaseSession implementation for this connection implementation
`SFBaseStatement` `getSFStatement()` Returns the SFStatementInterface implementation for this connection implementation
`void` `initializeConnection(String url, Properties info)` Initializes the SnowflakeConnection
`boolean` `supportsAsyncQuery()` Whether this Connection supports asynchronous queries.

### Method Detail

#### supportsAsyncQuery

    boolean supportsAsyncQuery()

Whether this Connection supports asynchronous queries. If yes, createAsyncResultSet may be called.

#### initializeConnection

    void initializeConnection(String url,
                              Properties info)
                       throws SQLException

Initializes the SnowflakeConnection

Throws:
  `SQLException`

#### getSFSession

    SFBaseSession getSFSession()

Gets the SFBaseSession implementation for this connection implementation

#### getSFStatement

    SFBaseStatement getSFStatement()
                            throws SQLException

Returns the SFStatementInterface implementation for this connection implementation

Throws:
  `SQLException`

#### createResultSet

    ResultSet createResultSet(String queryID,
                              Statement statement)
                       throws SQLException

Creates a result set from a query id.

Throws:
  `SQLException`

#### createResultSet

    SnowflakeBaseResultSet createResultSet(SFBaseResultSet resultSet,
                                           Statement statement)
                                    throws SQLException

Creates a SnowflakeResultSet from a base SFBaseResultSet for this connection implementation.

Throws:
  `SQLException`

#### createAsyncResultSet

    SnowflakeBaseResultSet createAsyncResultSet(SFBaseResultSet resultSet,
                                                Statement statement)
                                         throws SQLException

Creates an asynchronous result set from a base SFBaseResultSet for this connection implementation.

Throws:
  `SQLException`

#### getFileTransferAgent

    SFBaseFileTransferAgent getFileTransferAgent(String command,
                                                 SFBaseStatement statement)
                                          throws SQLNonTransientConnectionException,
                                                 SnowflakeSQLException

Parameters:
  `command` - The command to parse for this file transfer (e.g., PUT/GET)
  `statement` - The statement to use for this file transfer
Throws:
  `SQLNonTransientConnectionException`
  `SnowflakeSQLException`

#### 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.