public class TransactionExecutor extends Object
Constructor and Description |
---|
TransactionExecutor(Transaction transaction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort the transaction and roll back any changes.
|
Result |
execute(String statement)
Execute the statement against QLDB and retrieve the result.
|
Result |
execute(String statement,
List<com.amazon.ion.IonValue> parameters)
Execute the statement using the specified parameters against QLDB and retrieve the result.
|
String |
getTransactionId()
Get the ID of the current transaction.
|
public TransactionExecutor(Transaction transaction)
transaction
- The transaction object the TransactionExecutor wraps.public void abort()
public Result execute(String statement)
statement
- The PartiQL statement to be executed against QLDB.public Result execute(String statement, List<com.amazon.ion.IonValue> parameters)
statement
- The PartiQL statement to be executed against QLDB.parameters
- The parameters to be used with the PartiQL statement, for each ? placeholder in the statement.public String getTransactionId()