Project

General

Profile

« Previous | Next » 

Revision 5026

bin/map, db_xml.put_table() (row-based and column-based import): Don't sort the input table by its pkey, in order to support input tables with no pkey. Note that reading the input table in table order and having this match the input flat file's order is only possible with sql_io.import_csv()'s truncation of the table on a failed import, which ensures that the rows will be stored in inserted order.

View differences:

db_xml.py
219 219
        try: sql.add_row_num(db, in_table, sql.pkey_col)
220 220
        except sql.DatabaseErrors: pass # already has pkey
221 221
        cur = sql.insert_select(db, in_table, None, sql.mk_select(db,
222
            full_in_table, limit=this_limit, start=start))
222
            full_in_table, limit=this_limit, start=start, order_by=None))
223 223
        
224 224
        this_ct = cur.rowcount
225 225
        total += this_ct

Also available in: Unified diff