Revision 3386
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_io.py | ||
---|---|---|
295 | 295 |
default = None |
296 | 296 |
|
297 | 297 |
# Save default values for all rows since in_table may have rows deleted |
298 |
full_in_table = sql_gen.suffixed_table(in_table, '_full') |
|
299 |
full_in_table_cols = [in_pkey_col] |
|
300 |
if default != None: |
|
301 |
full_in_table_cols.append(default) |
|
302 |
default = sql_gen.with_table(default, full_in_table) |
|
303 |
sql.run_query_into(db, sql.mk_select(db, in_table, full_in_table_cols, |
|
304 |
order_by=None), into=full_in_table, add_pkey_=True) |
|
298 |
if is_function: full_in_table = in_table |
|
299 |
else: |
|
300 |
full_in_table = sql_gen.suffixed_table(in_table, '_full') |
|
301 |
full_in_table_cols = [in_pkey_col] |
|
302 |
if default != None: |
|
303 |
full_in_table_cols.append(default) |
|
304 |
default = sql_gen.with_table(default, full_in_table) |
|
305 |
sql.run_query_into(db, sql.mk_select(db, in_table, full_in_table_cols, |
|
306 |
order_by=None), into=full_in_table, add_pkey_=True) |
|
305 | 307 |
|
306 | 308 |
pkeys_names = [in_pkey, out_pkey] |
307 | 309 |
pkeys_cols = [in_pkey_col, out_pkey_col] |
Also available in: Unified diff
sql_io.py: put_table(): Creating full_in_table: If out_table is a SQL function, just use in_table because in_table is not modified