#10972: Use Expressions with Annotations
----------------------------------------------+-----------------------------
Reporter: [email protected] | Owner:
Status: new | Milestone:
Component: ORM aggregation | Version: SVN
Resolution: | Keywords: expression
aggregation aggregates annotation
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Changes (by miracle2k):
* has_patch: 0 => 1
Comment:
I've written a basic patch enabling this, against the current trunk:
http://github.com/miracle2k/django/tree/10972-aggrating-expr
There are some things I had trouble with, where I'm definitely not sure
what the right thing do to is, for example the way the Where node now
needs to handle children who's as_sql() returns a 2-tuple (sql, params):
http://github.com/miracle2k/django/commit/13b0e62772557ad54cd0b51b551ad230784e7eb1#L6L152
Generally though, it seems to work. Maybe this can inspire someone to do a
better implementation. A set of simple tests included.
--
Ticket URL: <http://code.djangoproject.com/ticket/10972#comment:7>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---