Project

General

Profile

« Previous | Next » 

Revision 5001

sql_io.py: import_csv(): Documented that sql.truncate() MUST be run so that the rows will be stored in inserted order, and the row_num added after import will match up with the CSV's row order

View differences:

lib/sql_io.py
240 240
    # cached, and will not be re-run if the import is retried.
241 241
    sql.create_table(db, table, typed_cols, has_pkey=False, col_indexes=False)
242 242
    
243
    # Free memory used by deleted rows from any failed import
243
    # Free memory used by deleted (rolled back) rows from any failed import.
244
    # This MUST be run so that the rows will be stored in inserted order, and
245
    # the row_num added after import will match up with the CSV's row order.
244 246
    sql.truncate(db, table)
245 247
    
246 248
    # Load the data

Also available in: Unified diff