Project

General

Profile

« Previous | Next » 

Revision 10140

bugfix: bin/map: in_is_db: inline metadata value columns (used by new-style import) so that they can be compared by value in XML simplifying functions (lib/xml_func.py)

View differences:

bin/map
371 371
                col_names = list(sql.col_names(cur))
372 372
                rows = sql.rows(cur)
373 373
            
374
            # inline metadata value columns
375
            col_default_values = {}
376
            for col_name in col_names:
377
                col = sql_gen.Col(col_name, table)
378
                if sql.col_is_constant(in_db, col):
379
                    col_default_values[col_name] = (metadata_prefix +
380
                        sql.col_default_value(in_db, col))
381
            for i, mapping in enumerate(mappings):
382
                in_, out = mapping
383
                mappings[i] = (col_default_values.get(in_, in_), out)
384
            
374 385
            if by_col:
375 386
                map_table(col_names, []) # just create the template
376 387
                

Also available in: Unified diff