Revision 2584
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
931 | 931 |
|
932 | 932 |
log_debug('Joining together input tables into temp table') |
933 | 933 |
# Place in new table for speed and so don't modify input if values edited |
934 |
in_table = sql_gen.Table(into.name.replace('_pkeys', '')+'_input')
|
|
934 |
in_table = sql_gen.Table('in')
|
|
935 | 935 |
flatten_cols = filter(sql_gen.is_table_col, mapping.values()) |
936 | 936 |
mapping = dicts.join(mapping, flatten(db, in_table, input_joins, |
937 | 937 |
flatten_cols, preserve=[in_pkey_col], start=0)) |
... | ... | |
997 | 997 |
|
998 | 998 |
# Do inserts and selects |
999 | 999 |
join_cols = sql_gen.ColDict() |
1000 |
insert_out_pkeys = sql_gen.Table(into.name+'_insert_out_pkeys')
|
|
1001 |
insert_in_pkeys = sql_gen.Table(into.name+'_insert_in_pkeys')
|
|
1000 |
insert_out_pkeys = sql_gen.Table(in_table.name+'_insert_out_pkeys')
|
|
1001 |
insert_in_pkeys = sql_gen.Table(in_table.name+'_insert_in_pkeys')
|
|
1002 | 1002 |
while True: |
1003 | 1003 |
if limit_ref[0] == 0: # special case |
1004 | 1004 |
log_debug('Creating an empty pkeys table') |
Also available in: Unified diff
sql.py: put_table(): Name the in_table just "in" plus the version #, and the insert_in_pkeys/insert_out_pkeys based on in_table, so that they don't take up so much space in the SQL