Project

General

Profile

« Previous | Next » 

Revision 2411

sql.py: index_col(): Cache the query so it doesn't try to add an index on the same column multiple times

View differences:

lib/sql.py
756 756
    index = sql_gen.as_Table(clean_name(str(col)))
757 757
    col = sql_gen.to_name_only_col(col)
758 758
    try: run_query(db, 'CREATE INDEX '+index.to_str(db)+' ON '+table.to_str(db)
759
        +' ('+col.to_str(db)+')', recover=True)
759
        +' ('+col.to_str(db)+')', recover=True, cacheable=True)
760 760
    except DuplicateTableException: pass # index already existed
761 761

  
762 762
def index_pkey(db, table, recover=None):

Also available in: Unified diff