diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-06-14 20:09:24 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-06-14 20:09:24 +0000 |
| commit | f522555392ed9e133431437dd815ba0e84bc2394 (patch) | |
| tree | c9c7be2353a4501d3b039e770bb77e74667ef467 /django/db/models/sql/compiler.py | |
| parent | 8f441f09628d3c3c8e5abe2132ad27e007fb550c (diff) | |
[soc2010/query-refactor] Implemented count() (and by extension the Count() aggregate on the primary key).
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql/compiler.py')
| -rw-r--r-- | django/db/models/sql/compiler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 1cd5cb535b..b4c9ea1f44 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -675,7 +675,10 @@ class SQLCompiler(object): self.query.clear_ordering(True) self.query.set_limits(high=1) return bool(self.execute_sql(SINGLE)) - + + def get_aggregates(self): + return self.execute_sql(SINGLE) + def results_iter(self): """ Returns an iterator over the results from executing this query. |
