On Fri, May 9, 2008 at 5:38 AM, Nicolas E. Lara G.
<[EMAIL PROTECTED]> wrote:
>
> Currently there is support for both aggregate and annotate on the
> simplest level. Some tests might be found under tests/modeltests/
> aggregation/ of the current state of the project. They can probably do
> as documentaion in the early stages of the project (i.e. now :p )
>
> Any comments or sugestions are more than welcome!   :-)

As a hint to the community - one of the best suggestions we can have
at this stage of the project is a set of interesting problems to
solve. This would give us a set of concrete 'problems' that we can use
to evaluate potential solutions. It may not be possible to find a
solution for every problem, but we won't know that until we have a
list of real problems to work with.

So, if you have an interesting use case for aggregates (i.e.,
aggregate queries that you would like to make, but currently need to
use raw SQL or an .extra() hack), let us know. If you can phrase that
query using the Author/Publisher/Book/Store model space that the new
aggregation model test defines, all the better.

Here's a few suggestions to get the ball rolling (with some reasoning
on why they are interesting):

* Does Author X have any friends?
(aggregate on a related object)

* Give me a list of all Books with more than 2 authors
(Query over the count of objects in a m2m relationship)

* Give me a list of all Authors that have no friends
(Query that counts when rows that don't exist in the m2m table)

* Give me a list of all publishers that have published more than 10 books
(Query over the reverse direction of a FK)

* Give me a list of all publishers that have published more than 10
books this year
(Query over the reverse direction of a FK, with a filter on the related object)

* Give me a list of all Books that were written by X and one other author.
(Query that checks a count of m2m objects, plus membership of the m2m set)

* Give me a list of all Authors that have published a book with at
least one other person
(Filters over a count generated on a related object)

* Give me the average price of all Books that were written by X and
one other author.
(Aggregate over objects discovered using membership of the m2m set)

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to