Project

General

Profile

« Previous | Next » 

Revision 2304

sql_gen.py: Join.to_str(): Fixed bug where order of right_table_col and left_table_col was reversed when applying as_ValueCond() and as_Col()

View differences:

lib/sql_gen.py
150 150
        def join(entry):
151 151
            '''Parses non-USING joins'''
152 152
            right_table_col, left_table_col = entry
153
            # Note that right_table_col is on the left in the comparison
153 154
            
154 155
            # Parse special values
155 156
            if left_table_col is join_using: left_table_col = right_table_col
156 157
            
157
            cond = as_ValueCond(right_table_col, self.table)
158
            return cond.to_str(db, as_Col(left_table_col, left_table))
158
            cond = as_ValueCond(left_table_col, left_table)
159
            return cond.to_str(db, as_Col(right_table_col, self.table))
159 160
        
160 161
        # Create join condition
161 162
        type_ = self.type_

Also available in: Unified diff