iterate_query¶
-
iterate_query
(connection, query)¶ Make as many
Query
actions as needed to iterate over all matching items. That is untilQueryResponse.last_evaluated_key
isNone
.>>> for item in iterate_query(connection, Query(table2).key_eq("h", 42).key_between("r1", 4, 7)): ... print item {u'h': 42, u'r1': 4, u'r2': 6} {u'h': 42, u'r1': 5, u'r2': 5} {u'h': 42, u'r1': 6} {u'h': 42, u'r1': 7}
The
Query
instance passed in must be discarded (it is modified during the iteration).