This function takes a partition key and optional sort key and returns a primary key for the DynamoDB client.
Depends on D3920
Differential D4015
[services][identity] helper function to create primary key for DynamoDB varun on May 12 2022, 8:06 AM. Authored by Tags None Referenced Files
Details This function takes a partition key and optional sort key and returns a primary key for the DynamoDB client. Depends on D3920 Unit tested
Diff Detail
Event TimelineComment Actions Looks ok, but wouldn't it be better to add tests separately? I mean, in a different file or something?
Comment Actions Replied inline
Comment Actions I think this would be better as two functions create_simple_primary_key(partition_key) and create_composite_primary_key(partition_key, sort_key). Terminology from https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey.
|