def dict_from_cursor(cursor):
    """
    Convert all rows from a cursor of results as a list of dicts
    :param cursor: database results cursor
    :return: list of dicts containing field_name:value
    """
    columns = [col[0] for col in cursor.description]
    return [
        dict(zip(columns, row))
        for row in cursor.fetchall()
    ]