#14030: Use F() objects in aggregates(), annotates() and values()
-------------------------------------+-------------------------------------
     Reporter:  delfick              |                    Owner:  nate_b
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  aggregate, annotate  |      Needs documentation:  1
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by smeatonj):

 * needs_docs:  0 => 1


Comment:

 I've made an attempt at refactoring Aggregates into ExpressionNode as
 nateb originally did. The points brought up by @akaariai were mostly
 addressed:

 - The biggest problem is in the existing F() <-> SQLEvaluator interaction
 Addressed by removing the SQLEvaluator structure, and allowing the
 Expression to evaluate itself. Backends can customise the sql generation
 using the as_{vendor} approach, introduced in the latest lookups refactor.

 - the result type coersion in sql/expressions.py feels scary
 Addressed by introducing an `output_type` param, which is required for
 mixed-type expressions.

 Discussion on this particular attempt is on the mailing list:
 https://groups.google.com/forum/#!topic/django-developers/8vEAwSwJGMc

 The incomplete pull request is: https://github.com/django/django/pull/2184

-- 
Ticket URL: <https://code.djangoproject.com/ticket/14030#comment:31>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.8eb1205445cfb198f992b20e4f3d2276%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to