Package com.amazon.rdsdata.client
Class Executor
java.lang.Object
com.amazon.rdsdata.client.Executor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes the SQL query.Specifies that the query should continue to be executed even after timeoutwithParameter(Object param) Sets a single parameter setwithParameter(String parameterName, Object value) Sets a single named parameter.withParamSets(Object... params) Sets multiple parameter setswithParamSets(List<Object> params) Sets multiple parameter setswithTransactionId(String transactionId) Specifies that the query should be executed in a transaction
-
Constructor Details
-
Executor
-
-
Method Details
-
withParameter
Sets a single parameter set- Parameters:
param- object which fields will be used as a source for parameters- Returns:
- a reference to this object so that method calls can be chained together
-
withParamSets
Sets multiple parameter sets- Parameters:
params-Listof objects which fields will be used as sources for parameters- Returns:
- a reference to this object so that method calls can be chained together
-
withParamSets
Sets multiple parameter sets- Parameters:
params- vararg array of objects which fields will be sources for parameters- Returns:
- a reference to this object so that method calls can be chained together
-
withParameter
Sets a single named parameter. Should not be combined withwithParameter(Object)andwithParamSets(Object...)- Parameters:
parameterName- Name of the parametervalue- value (can be of any supported type)- Returns:
- a reference to this object so that method calls can be chained together
-
execute
Executes the SQL query. If only one parameter set was added to thisExecutorbefore, or no parameters at all, ExecuteStatement API will be called If more than one parameter set was added (viawithParamSets()methods), BatchExecuteStatement API will be used- Returns:
- a
ExecutionResultinstance
-
withTransactionId
Specifies that the query should be executed in a transaction- Parameters:
transactionId- transaction ID- Returns:
- a reference to this object so that method calls can be chained together
-
withContinueAfterTimeout
Specifies that the query should continue to be executed even after timeout- Returns:
- a reference to this object so that method calls can be chained
-