public class SFSession extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
activeAsyncQueries |
static String |
SF_HEADER_AUTHORIZATION |
static String |
SF_HEADER_SNOWFLAKE_AUTHTYPE |
static String |
SF_HEADER_TOKEN_TAG |
static String |
SF_QUERY_REQUEST_ID |
| Constructor and Description |
|---|
SFSession() |
public static final String SF_QUERY_REQUEST_ID
public static final String SF_HEADER_AUTHORIZATION
public static final String SF_HEADER_SNOWFLAKE_AUTHTYPE
public static final String SF_HEADER_TOKEN_TAG
public boolean isSafeToClose()
public QueryStatus getQueryStatus(String queryID) throws SQLException
queryID - query ID of the query whose status is being investigatedSQLExceptionpublic void addProperty(SFSessionProperty sfSessionProperty, Object propertyValue) throws SFException
SFExceptionpublic void addProperty(String propertyName, Object propertyValue) throws SFException
Make sure a property is not added more than once and the number of properties does not exceed limit.
propertyName - property namepropertyValue - property valueSFException - exception raised from Snowflake componentspublic boolean containProperty(String key)
protected String getServerUrl()
public boolean isStringQuoted()
public void open()
throws SFException,
SnowflakeSQLException
SFException - this is a runtime exceptionSnowflakeSQLException - exception raised from Snowflake componentspublic OCSPMode getOCSPMode()
public List<DriverPropertyInfo> checkProperties()
public String getDatabaseVersion()
public int getDatabaseMajorVersion()
public int getDatabaseMinorVersion()
public String getSessionId()
public String getSessionToken()
public void close()
throws SFException,
SnowflakeSQLException
SnowflakeSQLException - if failed to close the connectionSFException - if failed to close the connectionprotected void startHeartbeatForThisSession()
protected void stopHeartbeatForThisSession()
protected void heartbeat()
throws SFException,
SQLException
SFException - exception raised from SnowflakeSQLException - exception raised from SQL generic layerspublic Properties getClientInfo()
public void setInjectedDelay(int delay)
public int getInjectSocketTimeout()
public void setInjectSocketTimeout(int injectSocketTimeout)
public void setInjectFileUploadFailure(String fileToFail)
public String getInjectFileUploadFailure()
public int getNetworkTimeoutInMilli()
public boolean isClosed()
public int getInjectClientPause()
public void setInjectClientPause(int injectClientPause)
protected int getHttpClientConnectionTimeout()
protected int getHttpClientSocketTimeout()
protected int getAndIncrementSequenceId()
public void setSfSQLMode(boolean sfSQLMode)
public boolean isSfSQLMode()
public boolean isEnableHeartbeat()
public void setEnableHeartbeat(boolean enableHeartbeat)
public void setHeartbeatFrequency(int frequency)
public long getHeartbeatFrequency()
public boolean getAutoCommit()
public void setAutoCommit(boolean autoCommit)
public boolean getPreparedStatementLogging()
public void setPreparedStatementLogging(boolean value)
public void setResultColumnCaseInsensitive(boolean resultColumnCaseInsensitive)
public boolean isResultColumnCaseInsensitive()
public String getDatabase()
public void setDatabase(String database)
public String getSchema()
public void setSchema(String schema)
public String getRole()
public void setRole(String role)
public String getWarehouse()
public void setWarehouse(String warehouse)
public void setMetadataRequestUseConnectionCtx(boolean enabled)
public void setMetadataRequestUseSessionDatabase(boolean enabled)
public boolean getMetadataRequestUseConnectionCtx()
public void setTreatNTZAsUTC(boolean enabled)
public void setFormatDateWithTimezone(boolean useTimezone)
public boolean getFormatDateWithTimezone()
public boolean getTreatNTZAsUTC()
public boolean getMetadataRequestUseSessionDatabase()
public SnowflakeType getTimestampMappedType()
public void setTimestampMappedType(SnowflakeType timestampMappedType)
public boolean isJdbcTreatDecimalAsInt()
public void setJdbcTreatDecimalAsInt(boolean jdbcTreatDecimalAsInt)
public void setEnableCombineDescribe(boolean enable)
public boolean getEnableCombineDescribe()
public Integer getQueryTimeout()
public String getUser()
public String getUrl()
public int getInjectWaitInPut()
public List<SFException> getSqlWarnings()
public void clearSqlWarnings()
public Telemetry getTelemetryClient()
public void closeTelemetryClient()
public boolean isClientTelemetryEnabled()
public void setClientTelemetryEnabled(boolean clientTelemetryEnabled)
public int getArrayBindStageThreshold()
public void setArrayBindStageThreshold(int arrayBindStageThreshold)
public String getArrayBindStage()
public void setArrayBindStage(String arrayBindStage)
public String getIdToken()
public String getMfaToken()
public boolean isStoreTemporaryCredential()
public void setStoreTemporaryCredential(boolean storeTemporaryCredential)
public void setServiceName(String serviceName)
serviceName - service namepublic String getServiceName()
public boolean isConservativeMemoryUsageEnabled()
public void setEnableConservativeMemoryUsage(boolean value)
public void setConservativeMemoryAdjustStep(int step)
public int getConservativeMemoryAdjustStep()
public void setClientMemoryLimit(int clientMemoryLimit)
public int getClientMemoryLimit()
public void setClientResultChunkSize(int clientResultChunkSize)
public int getClientResultChunkSize()
public void setClientPrefetchThreads(int clientPrefetchThreads)
public int getClientPrefetchThreads()
public boolean isValidateDefaultParameters()
public void setValidateDefaultParameters(boolean v)
public void setSnowflakeConnectionString(SnowflakeConnectString connStr)
public SnowflakeConnectString getSnowflakeConnectionString()
Copyright © 2020. All rights reserved.