'Iterate through the results of a database query, fetching in chunks.
Arguments:
cursor: The database cursor
Yields:
tuple of row values from the query'

def _iterate_results(self, cursor):

    while True:
        rows = cursor.fetchmany(self.QUERY_INTERVAL)
        if (not rows):
            break
        for row in rows:
            (yield row)
