Slide 52
Slide 52 text
Компилятор SQLCompiler
Препарируем
Django: QuerySet
FROM
name, alias, join_type, lhs, lhs_col, col, nullable =
self.query.alias_map[alias]
if join_type and not first:
result.append('%s %s%s ON (%s.%s = %s.%s)'
% (join_type, qn(name), alias_str, qn(lhs),
qn2(lhs_col), qn(alias), qn2(col)))
else:
connector = not first and ', ' or ''
result.append('%s%s%s' % (connector, qn(name), alias_str))