def sql2dict(queryset):
    """Return a SQL alchemy style query result into a list of dicts.

    Args:
        queryset (object): The SQL alchemy result.

    Returns:
        result (list): The converted query set.

    """
    if queryset is None:
        return []
    return [record.__dict__ for record in queryset]