Project

General

Profile

« Previous | Next » 

Revision 3687

db_xml.py: put(): Fixed bug where strings starting with "$" were interpreted as input columns in row-based mode (this should only apply to column-based mode). Explicitly store whether in row-based mode in is_literals var (similar to is_literals in sql_io.put_table()).

View differences:

lib/db_xml.py
100 100
        
101 101
        return put_(path)
102 102
    
103
    is_literals = in_table == None
103 104
    in_tables = []
104 105
    no_empty = set()
105
    if in_table != None:
106
    if not is_literals:
106 107
        in_tables.append(in_table)
107 108
        no_empty.add(in_table)
108 109
    
......
124 125
        
125 126
        # Translate values
126 127
        if isinstance(value, sql_gen.Col): # value is temp table column
128
            assert sql_gen.is_table_col(value)
127 129
            in_tables.append(value.table)
128
        elif util.is_str(value) and value.startswith(input_col_prefix):
129
            # value is input column
130
        elif (not is_literals and util.is_str(value)
131
            and value.startswith(input_col_prefix)): # value is input column
130 132
            row[out_col] = sql_gen.Col(strings.remove_prefix(input_col_prefix,
131 133
                value), in_table)
132 134
        else: # value is literal value

Also available in: Unified diff