Skip to content

Implement DynamoDB Auto Increment and Atomic Counter Annotations #66

Open
@darkmastermindz

Description

@darkmastermindz

Requesting an enhancement for Dynamo DB Data Repository given variable annotated with @DynamoDBHashKey, would like to see an annotation that is @DynamoDBAutoIncrement on an integer variable where multiple instances of the same @DynamoDBHashKey can be available.

Expected Behavior

This is different use case from updating an item, rather the data pattern of putting the same item key with incremented values on a attribute, i.e. same object but different versioning (Although @DynamoDBAtomicCounter which could be another good add for an annotation as well
see: https://linuxacademy.com/blog/linux-academy/dynamodb-atomic-counters/).

e.g.
Suppose there's a customer with orders that earn points when purchasing x item and there's multiple order numbers under the same customer hash key, but the history of all points must be kept. This way, we can query the primary key (the customer) and the order number and the total count of orders made in history.

https://stackoverflow.com/questions/38193431/auto-increment-counter-in-dynamo-db

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions