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))
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))