Revision 2460
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_gen.py | ||
---|---|---|
249 | 249 |
type_ = self.type_ |
250 | 250 |
joins = self.mapping |
251 | 251 |
if type_ is not filter_out and reduce(operator.and_, |
252 |
(v is join_same for v in joins.itervalues())): |
|
252 |
(v is join_same_not_null for v in joins.itervalues())):
|
|
253 | 253 |
# all cols w/ USING, so can use simpler USING syntax |
254 | 254 |
cols = (as_Col(v).to_str(db) for v in joins.iterkeys()) |
255 | 255 |
join_cond = 'USING ('+(', '.join(cols))+')' |
Also available in: Unified diff
sql_gen.py: Join.to_str(): Fixed bug where USING should be used if all columns are join_same_not_null, rather than join_same, because USING uses plain = for comparison. sql.py: put_table(): input_joins now can use sql_gen.join_same_not_null in order to use USING syntax.