Revision 2576
Added by Aaron Marcuse-Kubitza about 12 years ago
sql_gen.py | ||
---|---|---|
338 | 338 |
# all cols w/ USING, so can use simpler USING syntax |
339 | 339 |
cols = (as_Col(v).to_str(db) for v in joins.iterkeys()) |
340 | 340 |
join_cond = 'USING ('+(', '.join(cols))+')' |
341 |
else: join_cond = 'ON\n'+('\nAND\n'.join(map(join, joins.iteritems()))) |
|
341 |
else: |
|
342 |
if len(joins) == 1: whitespace = ' ' |
|
343 |
else: whitespace = '\n' |
|
344 |
join_cond = 'ON'+whitespace+('\nAND '.join( |
|
345 |
map(join, joins.iteritems()))) |
|
342 | 346 |
|
343 | 347 |
# Create join |
344 | 348 |
if type_ is filter_out: type_ = 'LEFT' |
Also available in: Unified diff
sql_gen.py Join.to_str(), sql.py mk_select(): Combining conditions: Don't add newlines where not needed, so that output is less vertically spread out