Interface IDynamoTableTransactGetItems<TRecord>
Interface to specify the TransactGetItems operation for a specific record type.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableTransactGetItems<TRecord>
where TRecord : class
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
Methods
Get<T>(Expression<Func<TRecord, T>>)
Selects a record property to fetch.
Declaration
IDynamoTableTransactGetItems<TRecord> Get<T>(Expression<Func<TRecord, T>> attribute)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TRecord, T>> | attribute | A lambda expression that returns the record property. |
Returns
Type | Description |
---|---|
IDynamoTableTransactGetItems<TRecord> |
Type Parameters
Name | Description |
---|---|
T | The property type. |
TryExecuteAsync(Int32, CancellationToken)
Attempts the TransactGetItems operation.
Declaration
Task<(bool Success, IEnumerable<TRecord> Items)> TryExecuteAsync(int maxAttempts = 5, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxAttempts | Maximum number of attempts with exponential back when encountering provisioned throughput is exceeded. |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.Collections.Generic.IEnumerable<TRecord>>> | A tuple indicating the success of the transatcion and the list of found items when successful. |