Package net.snowflake.client.jdbc
Interface SFConnectionHandler
-
- All Known Implementing Classes:
DefaultSFConnectionHandler
public interface SFConnectionHandlerClass 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 Modifier and Type Method Description SnowflakeBaseResultSetcreateAsyncResultSet(SFBaseResultSet resultSet, Statement statement)Creates an asynchronous result set from a base SFBaseResultSet for this connection implementation.ResultSetcreateResultSet(String queryID, Statement statement)Creates a result set from a query id.SnowflakeBaseResultSetcreateResultSet(SFBaseResultSet resultSet, Statement statement)Creates a SnowflakeResultSet from a base SFBaseResultSet for this connection implementation.default StringgetBindStageName()Overridable method that allows for different connection implementations to use different stage names for binds uploads.SFBaseFileTransferAgentgetFileTransferAgent(String command, SFBaseStatement statement)SFBaseSessiongetSFSession()Gets the SFBaseSession implementation for this connection implementationSFBaseStatementgetSFStatement()Returns the SFStatementInterface implementation for this connection implementationvoidinitializeConnection(String url, Properties info)Initializes the SnowflakeConnectionbooleansupportsAsyncQuery()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:
SQLNonTransientConnectionExceptionSnowflakeSQLException
-
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.
-
-