def as_dicts(cursor):
    """ Return a list of dictionaries from a result-set.
    """
    fields = [k[0] for k in cursor.description]
    result = []
    rows = cursor.fetchall()
    for row in rows:
        result.append(dict(zip(fields, row)))

    return(result)