On Fri, May 9, 2008 at 12:47 PM, Chris <[EMAIL PROTECTED]> wrote:
> Does django carry something similar to what I am looking for? If not,
> would a group_by feature be something worth adding to django?

If you're using a recent Django trunk checkout (after the
queryset-refactor merge), there is some basic support if you go look
at it. As of the qsrf merge, each QuerySet instance is backed by an
instance of django.db.models.sql.query.Query, which represents the
actual query to be executed, and that class offers a number of
features which are not yet exposed as high-level API methods. The one
you'll want to look at is the attribute 'group_by' of the Query class,
which should be a list or tuple of either column names or additional
Query objects; when the query is executed, the presence the 'group_by'
attribute will become a GROUP BY clause in the SQL.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to