Project

General

Profile

« Previous | Next » 

Revision 4999

sql_io.py: import_csv(): Free memory used by deleted rows from any failed import. Documented that sql.create_table() is not rolled back if the import fails, but instead is cached, and will not be re-run if the import is retried.

View differences:

sql_io.py
236 236
    typed_cols = [sql_gen.TypedCol(v, 'text') for v in col_names]
237 237
    
238 238
    log('Creating table')
239
    # Note that this is not rolled back if the import fails. Instead, it is
240
    # cached, and will not be re-run if the import is retried.
239 241
    sql.create_table(db, table, typed_cols, has_pkey=False, col_indexes=False)
240 242
    
243
    # Free memory used by deleted rows from any failed import
244
    sql.truncate(db, table)
245
    
241 246
    # Load the data
242 247
    def load_():
243 248
        if use_copy_from:

Also available in: Unified diff