Class DocumentBatchGet
- Namespace
- Amazon.DynamoDBv2.DocumentModel
- Assembly
- AWSSDK.DynamoDBv2.dll
Class for retrieving a batch of Documents from a single DynamoDB table.
public class DocumentBatchGet
- Inheritance
-
DocumentBatchGet
- Inherited Members
Constructors
DocumentBatchGet(Table)
Constructs a DocumentBatchGet instance for a specific table.
public DocumentBatchGet(Table targetTable)
Parameters
targetTable
TableTable to get items from.
Properties
AttributesToGet
List of attributes to retrieve.
public List<string> AttributesToGet { get; set; }
Property Value
ConsistentRead
If set to true, a consistent read is issued. Otherwise eventually-consistent is used.
public bool ConsistentRead { get; set; }
Property Value
Results
List of results retrieved from DynamoDB. Populated after Execute is called.
public List<Document> Results { get; }
Property Value
Methods
AddKey(Primitive)
Add a single item to get, identified by its hash primary key.
public void AddKey(Primitive hashKey)
Parameters
hashKey
PrimitiveHash key element of the item to get.
AddKey(Primitive, Primitive)
Add a single item to get, identified by its hash-and-range primary key.
public void AddKey(Primitive hashKey, Primitive rangeKey)
Parameters
hashKey
PrimitiveHash key element of the item to get.
rangeKey
PrimitiveRange key element of the item to get.
AddKey(IDictionary<string, DynamoDBEntry>)
Add a single item to get, identified by its key.
public void AddKey(IDictionary<string, DynamoDBEntry> key)
Parameters
key
IDictionary<string, DynamoDBEntry>Key of the item to get.
Combine(DocumentBatchGet)
Creates a MultiTableDocumentBatchGet object that is a combination of the current DocumentBatchGet and the specified DocumentBatchGet.
public MultiTableDocumentBatchGet Combine(DocumentBatchGet otherBatch)
Parameters
otherBatch
DocumentBatchGetOther DocumentBatchGet object.
Returns
- MultiTableDocumentBatchGet
MultiTableDocumentBatchGet consisting of the two DocumentBatchGet objects.
ExecuteAsync(CancellationToken)
Initiates the asynchronous execution of the Execute operation. Amazon.DynamoDBv2.DocumentModel.DocumentBatchGet.Execute
public Task ExecuteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenToken which can be used to cancel the task.
Returns
- Task
A Task that can be used to poll or wait for results, or both.