public class StmtUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StmtUtil.StmtOutput
Output for running a statement on server
|
| Constructor and Description |
|---|
StmtUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cancel(net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
Cancel a statement identifiable by a request id
|
static SFStatementType |
checkStageManageCommand(String sql)
A simple function to check if the statement is related to manipulate stage.
|
static StmtUtil.StmtOutput |
execute(net.snowflake.client.core.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,
net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
Issue get-result call to get query result given an in progress response.
|
public static StmtUtil.StmtOutput execute(net.snowflake.client.core.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, net.snowflake.client.core.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(net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
throws SFException,
SnowflakeSQLException
stmtInput - input statementSFException - if there is an internal exceptionSnowflakeSQLException - if failed to cancel the statementpublic static SFStatementType checkStageManageCommand(String sql)
sql - a SQL statement/commandCopyright © 2018. All rights reserved.