Project

General

Profile

« Previous | Next » 

Revision 3637

sql_io.py: put_table(): In log messages, use `.to_str(db)` instead of repr() where possible to use the SQL syntax of the DB driver

View differences:

sql_io.py
389 389
            sql.add_index(db, in_col, insert_in_table) # enable fast filtering
390 390
            if value != None and in_col not in not_null_cols:
391 391
                log_debug('Replacing invalid value '+strings.as_tt(repr(value))
392
                    +' with NULL in column '+strings.as_tt(repr(in_col)))
392
                    +' with NULL in column '+strings.as_tt(in_col.to_str(db)))
393 393
                sql.update(db, insert_in_table, [(in_col, None)],
394 394
                    sql_gen.ColValueCond(in_col, value))
395 395
            else:
396
                log_debug('Ignoring rows with '+strings.as_tt(repr(in_col))
396
                log_debug('Ignoring rows with '+strings.as_tt(in_col.to_str(db))
397 397
                    +' = '+strings.as_tt(repr(value)))
398 398
                sql.delete(db, insert_in_table,
399 399
                    sql_gen.ColValueCond(in_col, value))
......
402 402
            assert isinstance(in_col, sql_gen.NamedCol)
403 403
            if value != None:
404 404
                log_debug('Replacing invalid literal '
405
                    +strings.as_tt(repr(in_col))+' with NULL')
405
                    +strings.as_tt(in_col.to_str(db))+' with NULL')
406 406
                mapping[in_col.name] = None
407 407
            else:
408 408
                remove_all_rows()

Also available in: Unified diff