Project

General

Profile

« Previous | Next » 

Revision 2380

sql.py: put_table(): conds: Use a set instead of a list for faster checking of the "cond not in conds" assertion

View differences:

sql.py
777 777
            run_query_into(db, query, params, into_ref=pkeys_ref)
778 778
            pkeys_table_exists_ref[0] = True
779 779
    
780
    conds = []
780
    conds = set()
781 781
    distinct_on = []
782 782
    def mk_main_select(joins, cols):
783 783
        return mk_select(db, joins, cols, conds, distinct_on, limit=limit,
......
789 789
        db.log_debug('Ignoring rows with '+str(in_col)+' = '+repr(value))
790 790
        cond = (in_col, sql_gen.CompareCond(value, '!='))
791 791
        assert cond not in conds # avoid infinite loops
792
        conds.append(cond)
792
        conds.add(cond)
793 793
    
794 794
    # Do inserts and selects
795 795
    join_cols = {}

Also available in: Unified diff