Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Partition/Sort Key Overloads #4

Closed
junderhill opened this issue Apr 14, 2023 · 0 comments
Closed

Add Partition/Sort Key Overloads #4

junderhill opened this issue Apr 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@junderhill
Copy link
Owner

Previously Amazon referred to the Partition and Sort keys as 'Hash' and 'Range'.

The current naming of the the methods is aligned with this old terminology however renmaing them would be a breaking change therefore allowing the use of either would be ideal.

err = table.Get("UserID", w.UserID).
		SortKey("Time", dynamo.Equal, w.Time).
		One(&result)

would be synonymous with

err = table.Get("UserID", w.UserID).
		Range("Time", dynamo.Equal, w.Time).
		One(&result)

Note the use of SortKey() and not Sort()

@junderhill junderhill added the enhancement New feature or request label Apr 14, 2023
junderhill added a commit that referenced this issue Apr 14, 2023
Amazons terminology for Hash/Range keys is now Partition/Sort.
Adding a synonym to allow the use of `SortKey()` instead of `Range()`
will prevent confusion with new users who are unaware of the history of
terminology in DynamoDb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant