diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-08-20 02:20:33 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-08-20 02:20:33 +0000 |
| commit | 1a8f9b2b97d2549fe28c2d9090fece3f29f029fa (patch) | |
| tree | 15e79fab23561c33d7c4a2647c77e8a39b5f367b /django/db/models/query.py | |
| parent | 4f8225051246fb4c1560bbba77a4ead18bc22828 (diff) | |
Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/query.py')
| -rw-r--r-- | django/db/models/query.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 8cf4510622..767942c6a5 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -651,7 +651,7 @@ class DateQuerySet(QuerySet): table_name = qn(self.model._meta.db_table) field_name = qn(self._field.column) - if backend.allows_group_by_ordinal: + if connection.features.allows_group_by_ordinal: group_by = '1' else: group_by = connection.ops.date_trunc_sql(self._kind, '%s.%s' % (table_name, field_name)) @@ -663,7 +663,7 @@ class DateQuerySet(QuerySet): cursor.execute(sql, params) has_resolve_columns = hasattr(self, 'resolve_columns') - needs_datetime_string_cast = backend.needs_datetime_string_cast + needs_datetime_string_cast = connection.features.needs_datetime_string_cast dates = [] # It would be better to use self._field here instead of DateTimeField(), # but in Oracle that will result in a list of datetime.date instead of @@ -796,7 +796,7 @@ def get_where_clause(lookup_type, table_prefix, field_name, value, db_type): else: field_cast_sql = '%s%s' field_sql = field_cast_sql % (table_prefix, field_name) - if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and backend.needs_upper_for_iops: + if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and connection.features.needs_upper_for_iops: format = 'UPPER(%s) %s' else: format = '%s %s' |
