Project

General

Profile

« Previous | Next » 

Revision 4445

sql_io.py: cleanup_table(): Always clean up all columns in the table

View differences:

lib/sql_io.py
20 20

  
21 21
null_strs = ['', r'\N', 'NULL', 'UNKNOWN']
22 22

  
23
def cleanup_table(db, table, cols):
23
def cleanup_table(db, table, cols=None):
24 24
    table = sql_gen.as_Table(table)
25
    cols = [sql_gen.as_Col(c, table) for c in cols]
25
    cols = [sql_gen.as_Col(c, table) for c in sql.table_cols(db, table)]
26 26
    cols = filter(lambda c: sql_gen.is_text_col(db, c), cols)
27 27
    
28 28
    expr = 'trim(both from %s)'

Also available in: Unified diff