def get_view_fields(db, user_schema, tile_views):
    """Get the fields in a 2D tile view

    Parameters
    ----------
    tile_views : list of str

    Returns
    -------
    {'all' : list, 'geometry' : str}

    """
    if len(tile_views) > 0:
        schema_q = sql.Literal(user_schema)
        view_q = sql.Literal(tile_views[0])

        resultset = db.getQuery(sql.SQL("""
                            SELECT
                                column_name
                            FROM
                                information_schema.columns
                            WHERE
                                table_schema = {schema}
                                AND table_name = {view};
                            """).format(schema=schema_q,
                                        view=view_q))
        f = [field[0] for field in resultset]

        geom_res = db.getQuery(sql.SQL("""
                            SELECT
                                f_geometry_column
                            FROM
                                public.geometry_columns
                            WHERE
                                f_table_schema = {schema}
                                AND f_table_name = {view};
                            """).format(schema=schema_q,
                                        view=view_q))
        f_geom = geom_res[0][0]

        fields = {}
        fields['all'] = f
        fields['geometry'] = f_geom

        return(fields)

    else:
        return(None)