Class AsyncSearch<T>
- Namespace
- Amazon.DynamoDBv2.DataModel
- Assembly
- AWSSDK.DynamoDBv2.dll
A strongly-typed object for retrieving search results (Query or Scan) from DynamoDB.
public class AsyncSearch<T>
Type Parameters
T
- Inheritance
-
AsyncSearch<T>
- Inherited Members
Constructors
AsyncSearch()
This constructor is used for mocking. Users that want to mock AsyncSearch can create a subclass of AsyncSearch and make a public parameterless constructor.
protected AsyncSearch()
Properties
IsDone
Flag that, if true, indicates that the search is done
public virtual bool IsDone { get; }
Property Value
Methods
GetNextSetAsync(CancellationToken)
Initiates the asynchronous execution to get the next set of results from DynamoDB.
If there are more items in the Scan/Query, PaginationToken will be set and can be consumed in a new Scan/Query operation to resume retrieving items from this point.
public virtual Task<List<T>> GetNextSetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenToken which can be used to cancel the task.
Returns
- Task<List<T>>
A Task that can be used to poll or wait for results, or both. Results will include the next set of result items from DynamoDB.
GetRemainingAsync(CancellationToken)
Initiates the asynchronous execution to get all the remaining results from DynamoDB.
public virtual Task<List<T>> GetRemainingAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenToken which can be used to cancel the task.