From 598c22528f6fb28fc5c4bb6de8f8c6b4af3e03f8 Mon Sep 17 00:00:00 2001 From: Jeff Gregory Date: Mon, 3 Mar 2014 13:41:07 -0800 Subject: [PATCH] added support for ScanIndexForward and actual range ordering on range items and not just the dictionaries --- moto/dynamodb2/responses.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moto/dynamodb2/responses.py b/moto/dynamodb2/responses.py index 9c960ef48..8f90e8b04 100644 --- a/moto/dynamodb2/responses.py +++ b/moto/dynamodb2/responses.py @@ -243,6 +243,10 @@ class DynamoHandler(BaseResponse): if limit: items = items[:limit] + reversed = self.body.get("ScanIndexForward") + if reversed != False: + items.reverse() + result = { "Count": len(items), "Items": [item.attrs for item in items],