Project

General

Profile

« Previous | Next » 

Revision 5208

sql.py: map_expr(): When matching without quotes, support names containing spaces by not matching words when preceded or followed by quotes

View differences:

lib/sql.py
1052 1052
        
1053 1053
        # Replace out both with and without quotes
1054 1054
        expr = expr.replace(out.to_str(db), in_str)
1055
        expr = re.sub(r'(?<!\.)\b'+out.name+r'\b(?!\.)', in_str, expr)
1055
        expr = re.sub(r'(?<!["\.])\b'+out.name+r'\b(?!["\.])', in_str, expr)
1056 1056
        
1057 1057
        if in_cols_found != None and expr != orig_expr: # replaced something
1058 1058
            in_cols_found.append(in_)

Also available in: Unified diff