Interface IDynamoTablePutItem<TRecord>
Interface to specify a PutItem operation.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTablePutItem<TRecord>
where TRecord : class
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
Methods
ExecuteAsync(CancellationToken)
Execute the PutItem operation.
Declaration
Task<bool> ExecuteAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
True, when successful. False, when condition is not met. |
ExecuteReturnOldItemAsync(CancellationToken)
Execute the PutItem operation.
Declaration
Task<TRecord> ExecuteReturnOldItemAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
Old record when found. |
Set(String, AttributeValue)
Set the value of a DynamoDB item attribute. Used for storing attributes used by local/global secondary indices.
Declaration
IDynamoTablePutItem<TRecord> Set(string key, AttributeValue value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Name of attribute. |
Amazon. |
value | Value of attribute. |
Returns
Type | Description |
---|---|
IDynamo |
Set(String, String)
Set the value of a DynamoDB item attribute. Used for storing attributes used by local/global secondary indices.
Declaration
virtual IDynamoTablePutItem<TRecord> Set(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Name of attribute. |
System. |
value | Value of attribute. |
Returns
Type | Description |
---|---|
IDynamo |
WithCondition(Expression<Func<TRecord, Boolean>>)
Add condition for PutItem operation.
Declaration
IDynamoTablePutItem<TRecord> WithCondition(Expression<Func<TRecord, bool>> condition)
Parameters
Type | Name | Description |
---|---|---|
System. |
condition | A lambda predicate representing the DynamoDB condition expression. |
Returns
Type | Description |
---|---|
IDynamo |