summaryrefslogtreecommitdiff
path: root/django/db/models/sql/compiler.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-07-08 10:39:54 +1000
committerAlex Gaynor <alex.gaynor@gmail.com>2013-07-08 10:39:54 +1000
commit03d9566e0df45c72bffa99fe244a92f0279da56f (patch)
treeb4c9cc9260769d7f79f62c0fe16a2c5a5746e6ed /django/db/models/sql/compiler.py
parent0b69a755029f8a8ba6005b9d77be8132a7bc0fb3 (diff)
A large number of stylistic cleanups across django/db/
Diffstat (limited to 'django/db/models/sql/compiler.py')
-rw-r--r--django/db/models/sql/compiler.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index f70750abed..0b12bd1552 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -688,7 +688,7 @@ class SQLCompiler(object):
# the relation, which is always nullable.
new_nullable = True
table = model._meta.db_table
- self.fill_related_selections(model._meta, table, cur_depth+1,
+ self.fill_related_selections(model._meta, table, cur_depth + 1,
next, restricted, new_nullable)
def deferred_to_columns(self):
@@ -915,6 +915,7 @@ class SQLDeleteCompiler(SQLCompiler):
result.append('WHERE %s' % where)
return ' '.join(result), tuple(params)
+
class SQLUpdateCompiler(SQLCompiler):
def as_sql(self):
"""
@@ -1029,6 +1030,7 @@ class SQLUpdateCompiler(SQLCompiler):
for alias in self.query.tables[1:]:
self.query.alias_refcount[alias] = 0
+
class SQLAggregateCompiler(SQLCompiler):
def as_sql(self, qn=None):
"""
@@ -1050,6 +1052,7 @@ class SQLAggregateCompiler(SQLCompiler):
params = params + self.query.sub_params
return sql, params
+
class SQLDateCompiler(SQLCompiler):
def results_iter(self):
"""
@@ -1075,6 +1078,7 @@ class SQLDateCompiler(SQLCompiler):
date = date.date()
yield date
+
class SQLDateTimeCompiler(SQLCompiler):
def results_iter(self):
"""
@@ -1107,6 +1111,7 @@ class SQLDateTimeCompiler(SQLCompiler):
datetime = timezone.make_aware(datetime, self.query.tzinfo)
yield datetime
+
def order_modified_iter(cursor, trim, sentinel):
"""
Yields blocks of rows from a cursor. We use this iterator in the special