Start to add basic support for dynamodb2 item updating. Closes #16.
This commit is contained in:
parent
345b15f383
commit
e66916d5f1
3 changed files with 95 additions and 2 deletions
|
|
@ -315,3 +315,13 @@ class DynamoHandler(BaseResponse):
|
|||
else:
|
||||
er = 'com.amazonaws.dynamodb.v20120810#ConditionalCheckFailedException'
|
||||
return self.error(er)
|
||||
|
||||
def update_item(self):
|
||||
name = self.body['TableName']
|
||||
key = self.body['Key']
|
||||
update_expression = self.body['UpdateExpression']
|
||||
item = dynamodb_backend2.update_item(name, key, update_expression)
|
||||
|
||||
item_dict = item.to_json()
|
||||
item_dict['ConsumedCapacityUnits'] = 0.5
|
||||
return dynamo_json_dump(item_dict)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue