Added ScannedCount field to DynamoDB query response.

This commit is contained in:
Dmitry Zv 2016-03-16 15:53:29 -06:00
commit c2df7732e5
2 changed files with 7 additions and 2 deletions

View file

@ -369,7 +369,11 @@ class Table(object):
if scan_index_forward is False:
results.reverse()
return self._trim_results(results, limit, exclusive_start_key)
scanned_count = len(self.all_items())
results, last_evaluated_key = self._trim_results(results, limit,
exclusive_start_key)
return results, scanned_count, last_evaluated_key
def all_items(self):
for hash_set in self.items.values():