Added support for local senondary indexes in DynamoDB2

This commit is contained in:
Ian Auld 2016-01-13 15:27:02 -08:00
parent 6a13e0e226
commit 3cbaed9734

View File

@ -100,12 +100,14 @@ class DynamoHandler(BaseResponse):
attr = body["AttributeDefinitions"] attr = body["AttributeDefinitions"]
# getting the indexes # getting the indexes
global_indexes = body.get("GlobalSecondaryIndexes", []) global_indexes = body.get("GlobalSecondaryIndexes", [])
local_secondary_indexes = body.get("LocalSecondaryIndexes", [])
table = dynamodb_backend2.create_table(table_name, table = dynamodb_backend2.create_table(table_name,
schema=key_schema, schema=key_schema,
throughput=throughput, throughput=throughput,
attr=attr, attr=attr,
global_indexes=global_indexes) global_indexes=global_indexes,
indexes=local_secondary_indexes)
if table is not None: if table is not None:
return dynamo_json_dump(table.describe) return dynamo_json_dump(table.describe)
else: else: