def get_views_for(schema):

    def get_rec(view):
        self._fields = ['schema', 'view']
        return tuple([schema, view])
        Rec = namedtuple('View', 'schema view')
        self._fields = Rec._fields
        r_dict = dict(schema=schema, view=view)
        return Rec(**r_dict)
    sql_tmpl = self._template('metadata.views')
    if sql_tmpl:
        views = [r[0] for r in self.query(sql_tmpl.format(schema=schema))]
    else:
        self.get_engine(echo=echo)
        views = self.engine_inspect.get_view_names(schema)
    return [get_rec(v) for v in sorted(views)]
def get_views_for(schema):

    def get_rec(view):
        self._fields = ['schema', 'view']
        return tuple([schema, view])
        Rec = namedtuple('View', 'schema view')
        self._fields = Rec._fields
        r_dict = dict(schema=schema, view=view)
        return Rec(**r_dict)
    sql_tmpl = self._template('metadata.views')
    if sql_tmpl:
        views = [r[0] for r in self.query(sql_tmpl.format(schema=schema))]
    else:
        self.get_engine(echo=echo)
        views = self.engine_inspect.get_view_names(schema)
    return [get_rec(v) for v in sorted(views)]