-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
how to keep element sorted in batch #78
Comments
Unfortunately there is not. This is part of how DynamoDB works:
|
BTW I don't think this is impossible. This library does actually store all of your requests in order. It should be possible with All, but it won't work with Iter. Maybe I could add a SortedAll method. I'll reopen this and think about it. |
+1 for |
hi @guregu , I started to look at the implementation. I found 2 ways to accomplish it:
can you give me your opinion, or an alternative way to manage it? |
@jney I've given it some thought, and I think you'd probably have to keep track of item metadata inside of the iterator. BatchGet knows the names of the primary keys, so you'd have to read the primary key data from the items before they are unmarshaled and somehow associate them with the actual unmarshaled item. Then you can sort by the keys vs. the input order. |
I expected this:
To return element with ID "01", then element with ID "02", but it returns in the opposite way.
Is there a way to maintain order?
The text was updated successfully, but these errors were encountered: