Revision 2428
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
965 | 965 |
into=insert_in_pkeys) |
966 | 966 |
add_row_num(db, insert_in_pkeys) # for joining with output pkeys |
967 | 967 |
|
968 |
assert table_row_count(db, insert_out_pkeys) == table_row_count(db, |
|
969 |
insert_in_pkeys) |
|
970 |
|
|
968 | 971 |
db.log_debug('Joining together output and input pkeys') |
969 | 972 |
pkey_joins = [insert_in_pkeys, sql_gen.Join(insert_out_pkeys, |
970 | 973 |
{row_num_col: sql_gen.join_same_not_null})] |
... | ... | |
980 | 983 |
insert_into_pkeys(missing_rows_joins, |
981 | 984 |
[in_pkey_col, sql_gen.NamedCol(out_pkey, None)]) |
982 | 985 |
|
986 |
assert table_row_count(db, pkeys) == table_row_count(db, in_table) |
|
987 |
|
|
983 | 988 |
return sql_gen.Col(out_pkey, pkeys) |
984 | 989 |
|
985 | 990 |
##### Data cleanup |
Also available in: Unified diff
sql.py: put_table(): Assert that insert_out_pkeys and insert_in_pkeys have same row count. Assert that pkeys and in_table have same row count.