public class StmtUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StmtUtil.StmtInput
Input for executing a statement on server
|
static class |
StmtUtil.StmtOutput
Output for running a statement on server
|
| Modifier and Type | Field and Description |
|---|---|
static String |
SF_HEADER_AUTHORIZATION |
static String |
SF_HEADER_SNOWFLAKE_AUTHTYPE |
static String |
SF_HEADER_TOKEN_TAG |
static String |
SF_PATH_ABORT_REQUEST_V1 |
static String |
SF_PATH_QUERY_V1 |
static String |
SF_QUERY_REQUEST_ID |
| Constructor and Description |
|---|
StmtUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cancel(StmtUtil.StmtInput stmtInput)
Cancel a statement identifiable by a request id
|
static StmtUtil.StmtOutput |
execute(StmtUtil.StmtInput stmtInput)
Execute a statement
side effect: stmtInput.prevGetResultURL is set if we have started ping
pong and receives an exception from session token expiration so that
during retry we don't retry the query submission, but continue the
ping pong process.
|
protected static String |
getQueryResult(com.fasterxml.jackson.databind.JsonNode inProgressResponse,
String mediaType,
String previousGetResultPath,
StmtUtil.StmtInput stmtInput)
Issue get-result call to get query result given an in progress response.
|
public static final String SF_PATH_QUERY_V1
public static final String SF_PATH_ABORT_REQUEST_V1
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 static StmtUtil.StmtOutput execute(StmtUtil.StmtInput stmtInput) throws SFException, SnowflakeSQLException
stmtInput - input statementSFException - exception raised from Snowflake componentsSnowflakeSQLException - exception raised from Snowflake componentsprotected static String getQueryResult(com.fasterxml.jackson.databind.JsonNode inProgressResponse, String mediaType, String previousGetResultPath, StmtUtil.StmtInput stmtInput) throws SFException, SnowflakeSQLException
inProgressResponse - In pregress response in JSON formmediaType - media type namepreviousGetResultPath - previous get results pathstmtInput - input statementSFException - exception raised from Snowflake componentsSnowflakeSQLException - exception raised from Snowflake componentspublic static void cancel(StmtUtil.StmtInput stmtInput) throws SFException, SnowflakeSQLException
stmtInput - input statementSFException - if there is an internal exceptionSnowflakeSQLException - if failed to cancel the statementCopyright © 2017. All rights reserved.