Revision 2230
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
819 | 819 |
|
820 | 820 |
# rerun loop with additional constraints |
821 | 821 |
break # but until NullValueExceptions are handled, end loop here |
822 |
except NullValueException, e: |
|
823 |
out_col, = e.cols |
|
824 |
try: in_col = mapping[out_col] |
|
825 |
except KeyError: # no mapping for missing col, so every row invalid |
|
826 |
run_query_into_pkeys(*mk_select(db, insert_joins, |
|
827 |
[in_pkey, sql_gen.NamedCode(out_pkey, None)], |
|
828 |
order_by=None, start=0, table_is_esc=table_is_esc)) |
|
829 |
break |
|
830 |
else: |
|
831 |
conds[in_col] = sql_gen.CompareCond(None, '!=') |
|
832 |
# rerun loop with additional constraints |
|
822 | 833 |
|
823 | 834 |
return (pkeys_ref[0], out_pkey) |
824 | 835 |
|
Also available in: Unified diff
sql.py: put_table(): Handle NullValueExceptions by removing invalid rows