sorting - Order result items by other attribute than range key -


i've been researching lot couldn't find right answer/example.

in dynamodb have table 'user_playlists' hash key 'user_id' , range key 'playlist_id' (one user can have n playlists).

for each playlist store information when playlist created in attribute 'created_ts' (i store timestamp of creation time). 'created_ts' defined index.

now query 'user_playlists' table retrieve playlists particular user. query done hash , range key.

results ordered range key 'playlist_id' hash, order attribute means nothing me. want sort results attribute 'created_ts'.

is possible sort indexed attribute query method? existing logic of retrieving data hash , range key should stay. want add needed things ordered items created time.

no, cannot sort scan according amazon (https://forums.aws.amazon.com/thread.jspa?messageid=328982#). additionally, cannot sort query field, stated in question.

anyway, can sort results locally, doing sortby included in underscore library. not best solution, works


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -