到目前为止我的代码:
Map<String, String> expressionAttributeNames = new HashMap<String, String>();
expressionAttributeNames.put("emailid", "abc@gmail.com");
Map<String, Object> expressionAttributeValues = new HashMap<String, Object>();
expressionAttributeValues.put(":age", 25); // update Price to 25...
expressionAttributeValues.put(":cgpa", 9); //...but only if existing Price is 20
UpdateItemOutcome outcome = dynamoDB.updateItem(
new PrimaryKey("emailid","nikhil@gmail.com"),
"set age = :24", // UpdateExpression
"emailid = :nikhil@gmail.com", // ConditionExpression
expressionAttributeNames,
expressionAttributeValues);
UpdateItemOutcome outcome = dynamoDB.updateTable(updateTableRequest);