Project

General

Profile

« Previous | Next » 

Revision 4490

sql.py: map_expr(): Replacing without quotes: Don't match unquoted name where it's preceded or followed by '.', because this could be a '.' embedded in a punctuation-containing column name, such as those frequently used by column-based import. Note that because database-internal names currently do not contain punctuation, this situation only occurs when a database-internal expression (such as a check constraint condition) is replaced in two steps, and the first step introduces punctuation-containing column names into the expression.

View differences:

sql.py
1041 1041
        
1042 1042
        # Replace out both with and without quotes
1043 1043
        expr = expr.replace(out.to_str(db), in_str)
1044
        expr = re.sub(r'\b'+out.name+r'\b', in_str, expr)
1044
        expr = re.sub(r'(?<!\.)\b'+out.name+r'\b(?!\.)', in_str, expr)
1045 1045
        
1046 1046
        if in_cols_found != None and expr != orig_expr: # replaced something
1047 1047
            in_cols_found.append(in_)

Also available in: Unified diff