def get_indexes(self, table_name, echo=False):
    'Get indexes metadata for table'
    Rec = namedtuple('Indexes', 'schema table index_name column_name column_order unique')
    self._fields = Rec._fields
    (schema, table) = self._split_schema_table(table_name)

    def get_rec(r_dict):
        r_dict['schema'] = schema
        r_dict['table'] = table
        r_dict['index_name'] = r_dict['name']
        r_dict['unique'] = str(r_dict['unique'])
        del r_dict['name']
        for (i, col) in enumerate(r_dict['column_names']):
            r_dict['column_name'] = col
            r_dict['column_order'] = (i + 1)
            (yield Rec(**r_dict))
    sql_tmpl = self._template('metadata.indexes')
    if sql_tmpl:
        rows = self.query(sql_tmpl.format(table=table, schema=schema))
    else:
        self.get_engine(echo=echo)
        rows = self.engine_inspect.get_indexes(table, schema=schema)
        rows = [get_rec(r_dict) for r_dict in rows]
    return rows
Get indexes metadata for table
def get_indexes(self, table_name, echo=False):
    
    Rec = namedtuple('Indexes', 'schema table index_name column_name column_order unique')
    self._fields = Rec._fields
    (schema, table) = self._split_schema_table(table_name)

    def get_rec(r_dict):
        r_dict['schema'] = schema
        r_dict['table'] = table
        r_dict['index_name'] = r_dict['name']
        r_dict['unique'] = str(r_dict['unique'])
        del r_dict['name']
        for (i, col) in enumerate(r_dict['column_names']):
            r_dict['column_name'] = col
            r_dict['column_order'] = (i + 1)
            (yield Rec(**r_dict))
    sql_tmpl = self._template('metadata.indexes')
    if sql_tmpl:
        rows = self.query(sql_tmpl.format(table=table, schema=schema))
    else:
        self.get_engine(echo=echo)
        rows = self.engine_inspect.get_indexes(table, schema=schema)
        rows = [get_rec(r_dict) for r_dict in rows]
    return rows