def generate_results(cube, q):
    """ Generate the resulting records for this query, applying pagination.
    Values will be returned by their reference. """
    if q._limit is not None and q._limit < 1:
        return
    rp = cube.engine.execute(q)
    while True:
        row = rp.fetchone()
        if row is None:
            return
        yield dict(row.items())
Generate the resulting records for this query, applying pagination.
    Values will be returned by their reference.