Show / Hide Table of Contents

Interface IDynamoTableUpdateItem<TRecord>

Interface to specify a UpdateItem operation.

Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableUpdateItem<TRecord>
    where TRecord : class
Type Parameters
Name Description
TRecord

The record type.

Methods

Add(Expression<Func<TRecord, ISet<Byte[]>>>, IEnumerable<Byte[]>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<byte[]>>> attribute, IEnumerable<byte[]> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Byte[]>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Byte[]> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, ISet<Decimal>>>, IEnumerable<Decimal>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<decimal>>> attribute, IEnumerable<decimal> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Decimal>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Decimal> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, ISet<Double>>>, IEnumerable<Double>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<double>>> attribute, IEnumerable<double> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Double>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Double> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, ISet<Int32>>>, IEnumerable<Int32>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<int>>> attribute, IEnumerable<int> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Int32>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Int32> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, ISet<Int64>>>, IEnumerable<Int64>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<long>>> attribute, IEnumerable<long> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Int64>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Int64> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, ISet<String>>>, IEnumerable<String>)

Add one or more values to a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, ISet<string>>> attribute, IEnumerable<string> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.String>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.String> values

Values to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, Decimal>>, Decimal)

Add a value to a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, decimal>> attribute, decimal value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Decimal>> attribute

A lambda expression that selects the target record property.

System.Decimal value

Value to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, Double>>, Double)

Add a value to a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, double>> attribute, double value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Double>> attribute

A lambda expression that selects the target record property.

System.Double value

Value to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, Int32>>, Int32)

Add a value to a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, int>> attribute, int value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Int32>> attribute

A lambda expression that selects the target record property.

System.Int32 value

Value to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Add(Expression<Func<TRecord, Int64>>, Int64)

Add a value to a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Add(Expression<Func<TRecord, long>> attribute, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Int64>> attribute

A lambda expression that selects the target record property.

System.Int64 value

Value to add.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<Byte[]>>>, IEnumerable<Byte[]>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<byte[]>>> attribute, IEnumerable<byte[]> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Byte[]>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Byte[]> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<Decimal>>>, IEnumerable<Decimal>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<decimal>>> attribute, IEnumerable<decimal> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Decimal>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Decimal> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<Double>>>, IEnumerable<Double>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<double>>> attribute, IEnumerable<double> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Double>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Double> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<Int32>>>, IEnumerable<Int32>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<int>>> attribute, IEnumerable<int> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Int32>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Int32> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<Int64>>>, IEnumerable<Int64>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<long>>> attribute, IEnumerable<long> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.Int64>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.Int64> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Delete(Expression<Func<TRecord, ISet<String>>>, IEnumerable<String>)

Delete one or more values from a record set property.

Declaration
IDynamoTableUpdateItem<TRecord> Delete(Expression<Func<TRecord, ISet<string>>> attribute, IEnumerable<string> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<System.String>>> attribute

A lambda expression that selects the target record set property.

System.Collections.Generic.IEnumerable<System.String> values

Values to delete.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

ExecuteAsync(CancellationToken)

Execute the UpdateItem operation.

Declaration
Task<bool> ExecuteAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
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.Boolean>

True, when successful. False, when condition is not met.

ExecuteReturnNewItemAsync(CancellationToken)

Execute the UpdateItem operation.

Declaration
Task<TRecord> ExecuteReturnNewItemAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
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<TRecord>

Updated record when found and condition is met. null, otherwise.

ExecuteReturnOldItemAsync(CancellationToken)

Execute the UpdateItem operation.

Declaration
Task<TRecord> ExecuteReturnOldItemAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
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<TRecord>

Old record when found and condition is met. null, otherwise.

Remove(String)

Remove a DynamoDB item attribute. Used for removing attributes used by local/global secondary indices.

Declaration
IDynamoTableUpdateItem<TRecord> Remove(string key)
Parameters
Type Name Description
System.String key

Name of attribute.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Remove<T>(Expression<Func<TRecord, T>>)

Remove a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Remove<T>(Expression<Func<TRecord, T>> attribute)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, T>> attribute

A lambda expression that selects the target record property.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set(String, AttributeValue)

Set the value of a DynamoDB item attribute. Used for storing attributes used by local/global secondary indices.

Declaration
IDynamoTableUpdateItem<TRecord> Set(string key, AttributeValue value)
Parameters
Type Name Description
System.String key

Name of attribute.

Amazon.DynamoDBv2.Model.AttributeValue value

Value of attribute.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Set(String, String)

Set the value of a DynamoDB item attribute. Used for storing attributes used by local/global secondary indices.

Declaration
virtual IDynamoTableUpdateItem<TRecord> Set(string key, string value)
Parameters
Type Name Description
System.String key

Name of attribute.

System.String value

Value of attribute.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>

Set<T>(Expression<Func<TRecord, T>>, T)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, T>> attribute, T value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, T>> attribute

A lambda expression that selects the target record property.

T value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, T>>, Expression<Func<TRecord, T>>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, T>> attribute, Expression<Func<TRecord, T>> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, T>> attribute

A lambda expression that selects the target record property.

System.Linq.Expressions.Expression<System.Func<TRecord, T>> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, IDictionary<String, T>>>, IDictionary<String, T>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, IDictionary<string, T>>> attribute, IDictionary<string, T> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IDictionary<System.String, T>>> attribute

A lambda expression that selects the target record property.

System.Collections.Generic.IDictionary<System.String, T> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, IDictionary<String, T>>>, Expression<Func<TRecord, IDictionary<String, T>>>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, IDictionary<string, T>>> attribute, Expression<Func<TRecord, IDictionary<string, T>>> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IDictionary<System.String, T>>> attribute

A lambda expression that selects the target record property.

System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IDictionary<System.String, T>>> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, IList<T>>>, IList<T>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, IList<T>>> attribute, IList<T> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IList<T>>> attribute

A lambda expression that selects the target record property.

System.Collections.Generic.IList<T> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, IList<T>>>, Expression<Func<TRecord, IList<T>>>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, IList<T>>> attribute, Expression<Func<TRecord, IList<T>>> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IList<T>>> attribute

A lambda expression that selects the target record property.

System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.IList<T>>> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, ISet<T>>>, ISet<T>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, ISet<T>>> attribute, ISet<T> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<T>>> attribute

A lambda expression that selects the target record property.

System.Collections.Generic.ISet<T> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

Set<T>(Expression<Func<TRecord, ISet<T>>>, Expression<Func<TRecord, ISet<T>>>)

Set a record property.

Declaration
IDynamoTableUpdateItem<TRecord> Set<T>(Expression<Func<TRecord, ISet<T>>> attribute, Expression<Func<TRecord, ISet<T>>> value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<T>>> attribute

A lambda expression that selects the target record property.

System.Linq.Expressions.Expression<System.Func<TRecord, System.Collections.Generic.ISet<T>>> value

The value to set.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
Type Parameters
Name Description
T

The property type.

WithCondition(Expression<Func<TRecord, Boolean>>)

Add condition for UpdateItem operation.

Declaration
IDynamoTableUpdateItem<TRecord> WithCondition(Expression<Func<TRecord, bool>> condition)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TRecord, System.Boolean>> condition

A lambda predicate representing the DynamoDB condition expression.

Returns
Type Description
IDynamoTableUpdateItem<TRecord>
In This Article
Back to top Generated by DocFX