Tag: 增量

增加AWS DynamoDB中的Number属性Objective C

我正在努力增加已经保存在我的DynamoDB表中的项目的数字属性值我的代码目前是: AWSDynamoDBUpdateItemInput *updateItemInput = [AWSDynamoDBUpdateItemInput new]; updateItemInput.tableName = @"Table"; updateItemInput.key= @{ @"KeyPropertyName":@"KeyValue" }; updateItemInput.updateExpression = @"SET(counter = counter + :val)"; updateItemInput.expressionAttributeValues =@{ @":val":@1 }; AWSDynamoDB *dynamoDB = [AWSDynamoDB defaultDynamoDB]; [[dynamoDB updateItem:updateItemInput] continueWithBlock:^id(AWSTask *task) { if (task.error) { NSLog(@"The request failed. Error: [%@]", task.error); } if (task.exception) { NSLog(@"The request failed. Exception: [%@]", task.exception); } if […]