Closed sam-goodwin closed 5 years ago
Closes https://github.com/sam-goodwin/punchcard/issues/27
This change unifies the two DynamoDB types, HashTable and SortedTable, into DynamoDB.Table.
HashTable
SortedTable
DynamoDB.Table
To declare a HashTable:
new DynamoDB.Table(stack, 'my-table', { partitionKey: 'id', shape: { id: string(), count: integer(), }, billingMode: BillingMode.PAY_PER_REQUEST });
A SortedTable has a sortKey defined:
sortKey
new DynamoDB.Table(stack, 'my-table', { partitionKey: 'id', sortKey: 'count', shape: { id: string(), count: integer(), }, billingMode: BillingMode.PAY_PER_REQUEST });
Closes https://github.com/sam-goodwin/punchcard/issues/27
This change unifies the two DynamoDB types,
HashTable
andSortedTable
, intoDynamoDB.Table
.To declare a
HashTable
:A
SortedTable
has asortKey
defined: