Class AsyncTransactionExecutor
Transaction object used within asynchronous lambda executions to provide a reduced view that allows only the operations that are valid within the context of an active managed transaction.
Inheritance
Implements
Inherited Members
Namespace: Amazon.QLDB.Driver
Assembly: Amazon.QLDB.Driver.dll
Syntax
public class AsyncTransactionExecutor : IAsyncExecutable
Properties
| Improve this Doc View SourceId
Gets the transaction ID.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAbort()
Abort the transaction and roll back any changes.
Declaration
public async Task Abort()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | No object or value is returned by this method when it completes. |
Execute(String)
Execute the statement against QLDB and retrieve the result.
Declaration
public Task<IAsyncResult> Execute(string statement)
Parameters
Type | Name | Description |
---|---|---|
System.String | statement | The PartiQL statement to be executed against QLDB. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncResult> | Result from executed statement. |
Exceptions
Type | Condition |
---|---|
Amazon.Runtime.AmazonServiceException | Thrown when there is an error executing against QLDB. |
Execute(String, IIonValue[])
Execute the statement using the specified parameters against QLDB and retrieve the result.
Declaration
public Task<IAsyncResult> Execute(string statement, params IIonValue[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | statement | The PartiQL statement to be executed against QLDB. |
Amazon.IonDotnet.Tree.IIonValue[] | parameters | Parameters to execute. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncResult> | Result from executed statement. |
Exceptions
Type | Condition |
---|---|
Amazon.Runtime.AmazonServiceException | Thrown when there is an error executing against QLDB. |
Execute(String, List<IIonValue>)
Execute the statement using the specified parameters against QLDB and retrieve the result.
Declaration
public Task<IAsyncResult> Execute(string statement, List<IIonValue> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | statement | The PartiQL statement to be executed against QLDB. |
System.Collections.Generic.List<Amazon.IonDotnet.Tree.IIonValue> | parameters | Parameters to execute. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncResult> | Result from executed statement. |
Exceptions
Type | Condition |
---|---|
Amazon.Runtime.AmazonServiceException | Thrown when there is an error executing against QLDB. |
Execute<T>(IQuery<T>)
Execute the IQuery against QLDB and retrieve the result.
Declaration
public Task<IAsyncResult<T>> Execute<T>(IQuery<T> query)
Parameters
Type | Name | Description |
---|---|---|
IQuery<T> | query | The query object containing the PartiQL statement and parameters to be executed against QLDB. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IAsyncResult<T>> | Result from executed statement. |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Exceptions
Type | Condition |
---|---|
Amazon.Runtime.AmazonServiceException | Thrown when there is an error executing against QLDB. |
Query<T>(String, Object[])
Create a Query object containing the PartiQL statement and parameters to be executed against QLDB.
Declaration
public IQuery<T> Query<T>(string statement, params object[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | statement | The PartiQL statement to be executed against QLDB. |
System.Object[] | parameters | Parameters to execute. |
Returns
Type | Description |
---|---|
IQuery<T> | A Query object. |
Type Parameters
Name | Description |
---|---|
T | The return type. |