Interface IDynamoTableBatchGetItems
Interface to specify the BatchGetItems operation with mixed record types.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableBatchGetItems
Methods
BeginGetItem<TRecord>(DynamoPrimaryKey<TRecord>, Boolean)
Begin specification of a GetItem operation for BatchGetItems.
Declaration
IDynamoTableBatchGetItemsGetItem<TRecord> BeginGetItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey, bool consistentRead = false)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
Dynamo |
primaryKey | Primary key of the item to retrieve. |
System. |
consistentRead | Boolean indicating if the read operation should be performed against the main partition (2x cost compared to eventual consistent read). |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
ExecuteAsync(Int32, CancellationToken)
Execute the BatchGetItems operation.
Declaration
Task<IEnumerable<object>> ExecuteAsync(int maxAttempts = 5, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
maxAttempts | Maximum number of attempts with exponential back when encountering provisioned throughput is exceeded. |
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
List of found items. |
Exceptions
Type | Condition |
---|---|
Dynamo |
Thrown when the maximum number of attempts is exceeded. |
GetItem<TRecord>(DynamoPrimaryKey<TRecord>, Boolean)
Add a GetItem operation to BatchGetItems that retrieves all attributes for the given primary key.
This method is the same: BeginGetItem(primaryKey, consistentRead).End()
.
Declaration
virtual IDynamoTableBatchGetItems GetItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey, bool consistentRead = false)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
Dynamo |
primaryKey | Primary key of the item to retrieve. |
System. |
consistentRead | Boolean indicating if the read operation should be performed against the main partition (2x cost compared to eventual consistent read). |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |