You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

compiler.py 704B

12345678910111213141516171819202122232425
  1. from django.db.models.sql import compiler
  2. class SQLCompiler(compiler.SQLCompiler):
  3. def as_subquery_condition(self, alias, columns, compiler):
  4. qn = compiler.quote_name_unless_alias
  5. qn2 = self.connection.ops.quote_name
  6. sql, params = self.as_sql()
  7. return '(%s) IN (%s)' % (', '.join('%s.%s' % (qn(alias), qn2(column)) for column in columns), sql), params
  8. class SQLInsertCompiler(compiler.SQLInsertCompiler, SQLCompiler):
  9. pass
  10. class SQLDeleteCompiler(compiler.SQLDeleteCompiler, SQLCompiler):
  11. pass
  12. class SQLUpdateCompiler(compiler.SQLUpdateCompiler, SQLCompiler):
  13. pass
  14. class SQLAggregateCompiler(compiler.SQLAggregateCompiler, SQLCompiler):
  15. pass