spulec/moto — pull request #99 by JeffMGreg (2014-02-21 20:18:57+00:00)
Title: Order results for query with key range_key and enfore limit on query and scan calls

Currently when doing a `query` the order and limit are not being observed as should be per the [docs](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html)
>Query results are always sorted by the range key. If the data type of the range key is Number, the results are returned in numeric order; otherwise, the results are returned in order of ASCII character code values. By default, the sort order is ascending. To reverse the order use the ScanIndexForward parameter set to false.

Also when passing a limit parameter, `scan` will return that number of items.