Revision 3106
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_io.py | ||
---|---|---|
295 | 295 |
pkeys_table_exists_ref[0] = True |
296 | 296 |
|
297 | 297 |
limit_ref = [None] |
298 |
insert_in_table = in_table |
|
298 | 299 |
conds = set() |
299 | 300 |
distinct_on = sql_gen.ColDict(db, out_table) |
300 | 301 |
def mk_main_select(joins, cols): |
301 |
return sql.mk_select(db, joins, cols, conds, limit=limit_ref[0], |
|
302 |
conds_ = [(sql_gen.with_table(k, insert_in_table), v) for k, v in conds] |
|
303 |
return sql.mk_select(db, joins, cols, conds_, limit=limit_ref[0], |
|
302 | 304 |
start=0) |
303 | 305 |
|
304 | 306 |
exc_strs = set() |
... | ... | |
336 | 338 |
insert_in_pkeys = insert_pkeys_table('in') |
337 | 339 |
|
338 | 340 |
# Do inserts and selects |
339 |
insert_in_table = in_table |
|
340 | 341 |
join_cols = sql_gen.ColDict(db, out_table) |
341 | 342 |
while True: |
342 | 343 |
if limit_ref[0] == 0: # special case |
Also available in: Unified diff
sql_io.py: put_table(): mk_main_select(): Fixed bug where the table of each cond needed to be changed to insert_in_table because mk_main_select() uses the distinct table rather than the full input table