Project

General

Profile

« Previous | Next » 

Revision 2515

sql.py, db_xml.py: Removed unnecessary calls to sql_gen.clean_name() now that str() handles this automatically

View differences:

lib/sql.py
684 684
        items.append((orig_col, col))
685 685
    preserve = set(preserve)
686 686
    for col in cols:
687
        if col not in preserve:
688
            items.append((col, sql_gen.Col(sql_gen.clean_name(str(col)), into)))
687
        if col not in preserve: items.append((col, sql_gen.Col(str(col), into)))
689 688
    
690 689
    if not as_items: items = dict(items)
691 690
    return items
......
786 785
    assert sql_gen.is_table_col(col)
787 786
    
788 787
    table = col.table
789
    index = sql_gen.as_Table(sql_gen.clean_name(str(col)))
788
    index = sql_gen.as_Table(str(col))
790 789
    col = sql_gen.to_name_only_col(col)
791 790
    try: run_query(db, 'CREATE INDEX '+index.to_str(db)+' ON '+table.to_str(db)
792 791
        +' ('+col.to_str(db)+')', recover=True, cacheable=True, log_level=3)
lib/db_xml.py
136 136
        try: in_col = row[out_col]
137 137
        except KeyError: pass
138 138
        else: # has a rank column, so hierarchical
139
            col_name = sql_gen.clean_name(str(
140
                sql_gen.remove_col_rename(in_col)))
139
            col_name = str(sql_gen.remove_col_rename(in_col))
141 140
            into = out_table+'['+out_col+'='+col_name+']'
142 141
    else: # has a value column, so function-like
143
        col_name = sql_gen.clean_name(str(sql_gen.remove_col_rename(in_col)))
142
        col_name = str(sql_gen.remove_col_rename(in_col))
144 143
        into = out_table+'('+col_name+')'
145 144
    return into
146 145

  

Also available in: Unified diff