Package com.firebolt.jdbc.client.query
Class StatementClientImpl
java.lang.Object
com.firebolt.jdbc.client.FireboltClient
com.firebolt.jdbc.client.query.StatementClientImpl
- All Implemented Interfaces:
StatementClient
,CacheListener
,EventListener
-
Field Summary
Fields inherited from class com.firebolt.jdbc.client.FireboltClient
connection
-
Constructor Summary
ConstructorsConstructorDescriptionStatementClientImpl
(okhttp3.OkHttpClient httpClient, FireboltConnection connection, String customDrivers, String customClients) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortStatement
(@NonNull String statementLabel, @NonNull FireboltProperties properties) Call endpoint to abort a running SQL statementexecuteSqlStatement
(@NonNull StatementInfoWrapper statementInfoWrapper, @NonNull FireboltProperties connectionProperties, boolean systemEngine, int queryTimeout) Sends SQL statement to Firebolt Retries to send the statement if the first execution is unauthorizedboolean
isStatementRunning
(String statementId) protected void
validateResponse
(String host, int statusCode, String errorMessageFromServer) protected void
validateResponse
(String host, okhttp3.Response response, Boolean isCompress) Methods inherited from class com.firebolt.jdbc.client.FireboltClient
cleanup, createPostRequest, createPostRequest, execute, execute, getResource, getResource, getResponseAsString, isCallSuccessful, jsonToObject
-
Constructor Details
-
StatementClientImpl
public StatementClientImpl(okhttp3.OkHttpClient httpClient, FireboltConnection connection, String customDrivers, String customClients)
-
-
Method Details
-
executeSqlStatement
public InputStream executeSqlStatement(@NonNull @NonNull StatementInfoWrapper statementInfoWrapper, @NonNull @NonNull FireboltProperties connectionProperties, boolean systemEngine, int queryTimeout) throws SQLException Sends SQL statement to Firebolt Retries to send the statement if the first execution is unauthorized- Specified by:
executeSqlStatement
in interfaceStatementClient
- Parameters:
statementInfoWrapper
- the statement wrapperconnectionProperties
- the connection propertiessystemEngine
- indicates if system engine is usedqueryTimeout
- query timeout- Returns:
- the server response
- Throws:
SQLException
-
abortStatement
public void abortStatement(@NonNull @NonNull String statementLabel, @NonNull @NonNull FireboltProperties properties) throws SQLException Description copied from interface:StatementClient
Call endpoint to abort a running SQL statement- Specified by:
abortStatement
in interfaceStatementClient
- Throws:
SQLException
-
isStatementRunning
- Specified by:
isStatementRunning
in interfaceStatementClient
-
validateResponse
protected void validateResponse(String host, okhttp3.Response response, Boolean isCompress) throws SQLException - Overrides:
validateResponse
in classFireboltClient
- Throws:
SQLException
-
validateResponse
protected void validateResponse(String host, int statusCode, String errorMessageFromServer) throws SQLException - Overrides:
validateResponse
in classFireboltClient
- Throws:
SQLException
-