Revision 2298
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
165 | 165 |
if type_ is not filter_out and reduce(operator.and_, |
166 | 166 |
(v is join_using for v in joins.itervalues())): |
167 | 167 |
# all cols w/ USING, so can use simpler USING syntax |
168 |
join_cond = 'USING ('+(', '.join(joins.iterkeys()))+')' |
|
168 |
cols = (as_Col(v).to_str(db) for v in joins.iterkeys()) |
|
169 |
join_cond = 'USING ('+(', '.join(cols))+')' |
|
169 | 170 |
else: join_cond = 'ON '+(' AND '.join(map(join, joins.iteritems()))) |
170 | 171 |
|
171 | 172 |
# Create join |
Also available in: Unified diff
sql_gen.py: Join.to_str(): Fixed bug in USING syntax where columns were not escaped