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 TypeMethodDescriptionvoidabortStatement(@NonNull String statementLabel, @NonNull FireboltProperties properties) Call endpoint to abort a running SQL statementexecuteSqlStatement(@NonNull StatementInfoWrapper statementInfoWrapper, @NonNull FireboltProperties connectionProperties, boolean systemEngine, int queryTimeout, boolean isServerAsync) Sends SQL statement to Firebolt Retries to send the statement if the first execution is unauthorizedbooleanisStatementRunning(String statementId) protected voidvalidateResponse(String host, int statusCode, String errorMessageFromServer) protected voidvalidateResponse(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, boolean isServerAsync) throws SQLException Sends SQL statement to Firebolt Retries to send the statement if the first execution is unauthorized- Specified by:
executeSqlStatementin 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:StatementClientCall endpoint to abort a running SQL statement- Specified by:
abortStatementin interfaceStatementClient- Throws:
SQLException
-
isStatementRunning
- Specified by:
isStatementRunningin interfaceStatementClient
-
validateResponse
protected void validateResponse(String host, okhttp3.Response response, Boolean isCompress) throws SQLException - Overrides:
validateResponsein classFireboltClient- Throws:
SQLException
-
validateResponse
protected void validateResponse(String host, int statusCode, String errorMessageFromServer) throws SQLException - Overrides:
validateResponsein classFireboltClient- Throws:
SQLException
-