Project

General

Profile

« Previous | Next » 

Revision 2278

sql.py: put_table(): Switched joins to sql_gen.Join objects

View differences:

lib/sql.py
750 750
    in_tables0 = in_tables.pop(0) # first table is separate
751 751
    in_pkey = pkey(db, in_tables0, recover=True, table_is_esc=table_is_esc)
752 752
    in_pkey_col = sql_gen.col2sql_gen(in_pkey, in_tables0, table_is_esc)
753
    insert_joins = [in_tables0]+[(t, {in_pkey: sql_gen.join_using})
754
        for t in in_tables]
753
    insert_joins = [in_tables0]+[sql_gen.Join(v, {in_pkey: sql_gen.join_using})
754
        for v in in_tables]
755 755
    
756 756
    out_pkey = pkey(db, out_table, recover=True, table_is_esc=table_is_esc)
757 757
    out_pkey_col = sql_gen.col2sql_gen(out_pkey, out_table, table_is_esc)
......
785 785
    while True:
786 786
        try:
787 787
            if join_cols != {}:
788
                select_joins = insert_joins + [(out_table, join_cols)]
788
                select_joins = insert_joins+[sql_gen.Join(out_table, join_cols)]
789 789
                db.log_debug('Getting pkeys of already existing rows')
790 790
                run_query_into_pkeys(*mk_select(db, select_joins, pkeys_cols,
791 791
                    order_by=None, start=0, table_is_esc=table_is_esc))

Also available in: Unified diff