Revision 5069
Added by Aaron Marcuse-Kubitza about 12 years ago
sql_io.py | ||
---|---|---|
336 | 336 |
IMPORTANT: Must be run at the *beginning* of a transaction. |
337 | 337 |
@param in_tables The main input table to select from, followed by a list of |
338 | 338 |
tables to join with it using the main input table's pkey |
339 |
* Can be any fixed-size iterable type |
|
339 | 340 |
@param mapping dict(out_table_col=in_table_col, ...) |
340 | 341 |
* out_table_col: str (*not* sql_gen.Col) |
341 | 342 |
* in_table_col: sql_gen.Col|literal-value |
... | ... | |
366 | 367 |
else: out_pkey = sql.pkey(db, out_table, recover=True) |
367 | 368 |
out_pkey_col = sql_gen.as_Col(out_pkey, out_table) |
368 | 369 |
|
369 |
in_tables_ = in_tables[:] # don't modify input!
|
|
370 |
in_tables_ = copy.copy(in_tables) # don't modify input!
|
|
370 | 371 |
try: in_tables0 = in_tables_.pop(0) # first table is separate |
371 | 372 |
except IndexError: in_tables0 = None |
372 | 373 |
else: |
Also available in: Unified diff
sql_io.py: put_table(): Support in_tables of any fixed-size iterable type