Revision 4993
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql_io.py | ||
---|---|---|
27 | 27 |
cols = filter(lambda c: sql_gen.is_text_col(db, c), cols) |
28 | 28 |
if not cols: return |
29 | 29 |
|
30 |
db.log_debug('Cleaning up table', level=1.5) |
|
31 |
|
|
30 | 32 |
expr = 'trim(both from %s)' |
31 | 33 |
for null in null_strs: expr = 'nullif('+expr+', '+db.esc_value(null)+')' |
32 | 34 |
changes = [(v, sql_gen.CustomCode(expr % v.to_str(db))) for v in cols] |
bin/csv2db | ||
---|---|---|
120 | 120 |
load() # try again with different approach |
121 | 121 |
else: raise |
122 | 122 |
|
123 |
log('Cleaning up table') |
|
124 | 123 |
sql_io.cleanup_table(db, table) |
125 | 124 |
|
126 | 125 |
main() |
Also available in: Unified diff
sql_io.py: cleanup_table(): Print 'Cleaning up table' log message