diff options
| author | Josh Smeaton <josh.smeaton@gmail.com> | 2015-01-17 16:03:46 +1100 |
|---|---|---|
| committer | Josh Smeaton <josh.smeaton@gmail.com> | 2015-01-27 14:47:38 +1100 |
| commit | e56810e839db2beddc8a7b6e917158855ef381dc (patch) | |
| tree | 32e9a400276b6dd92b02aa78ddddef3d55c292c1 /django/db/models/sql | |
| parent | 5dff3513cc1bb998abe60f52269790268a74220c (diff) | |
[1.8.x] Fixed #24154 -- Backends can now check support for expressions
Backport of 8196e4bdf498acb05e6680c81f9d7bf700f4295c from master
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 5 | ||||
| -rw-r--r-- | django/db/models/sql/where.py | 11 |
2 files changed, 0 insertions, 16 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 9693206b67..0d89de2458 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -230,11 +230,6 @@ class Query(object): raise ValueError("Need either using or connection") if using: connection = connections[using] - - # Check that the compiler will be able to execute the query - for alias, annotation in self.annotation_select.items(): - connection.ops.check_aggregate_support(annotation) - return connection.ops.compiler(self.compiler)(self, connection, using) def get_meta(self): diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py index e3766c51d6..6a03210a93 100644 --- a/django/db/models/sql/where.py +++ b/django/db/models/sql/where.py @@ -325,17 +325,6 @@ class WhereNode(tree.Node): def contains_aggregate(self): return self._contains_aggregate(self) - @classmethod - def _refs_field(cls, obj, aggregate_types, field_types): - if not isinstance(obj, tree.Node): - if hasattr(obj.rhs, 'refs_field'): - return obj.rhs.refs_field(aggregate_types, field_types) - return False - return any(cls._refs_field(c, aggregate_types, field_types) for c in obj.children) - - def refs_field(self, aggregate_types, field_types): - return self._refs_field(self, aggregate_types, field_types) - class EmptyWhere(WhereNode): def add(self, data, connector): |
