public PutRequest(AttributeCollection item) { Item = item; }
public DbValue(AttributeCollection map) { this.kind = DbValueType.M; this.value = map; }
public PutItemRequest(string tableName, AttributeCollection item) { TableName = tableName ?? throw new ArgumentNullException(nameof(tableName)); Item = item ?? throw new ArgumentNullException(nameof(item)); }
public DynamoExpression(JsonObject attributeNames, AttributeCollection attributeValues) { AttributeNames = attributeNames; AttributeValues = attributeValues; }
public Task <PutItemResult> PutAsync(T entity) { var request = new PutItemRequest(tableName, AttributeCollection.FromObject(entity, metadata)); return(client.PutItemUsingRetryPolicyAsync(request, retryPolicy)); }
public GetItemResult(AttributeCollection item, ConsumedCapacity?consumedCapacity) { Item = item; ConsumedCapacity = consumedCapacity; }
public UpdateExpression( IEnumerable <Change> changes, JsonObject attributeNames, AttributeCollection attributeValues) { this.attributeNames = attributeNames; this.attributeValues = attributeValues; foreach (var change in changes) { /* * An update expression consists of sections. * Each section begins with a SET, REMOVE, ADD or DELETE keyword. * You can include any of these sections in an update expression in any order. * However, each section keyword can appear only once. */ if (change.Operation == DataOperation.Remove) { // REMOVE (attributes) // e.g. REMOVE Title, RelatedItems[2], Pictures.RearView // DELETE (elements in set) // e.g. Color :c (deleted :c from color set) if (change.Value == null) { // Remove attribute if (remove == null) { remove = new StringBuilder("REMOVE "); } WriteChange(change, remove); } else { // Delete element if (delete == null) { delete = new StringBuilder("DELETE "); } WriteChange(change, delete); } } else if (change.Operation == DataOperation.Add) { if (add == null) { add = new StringBuilder("ADD "); } WriteChange(change, add); } else if (change.Operation == DataOperation.Replace) { if (set == null) { set = new StringBuilder("SET "); } WriteChange(change, set); } else { throw new Exception("Unexpected change operation: " + change.Operation); } } }