#24154: Fix check_aggregate_support for Expressions
-------------------------------------+-------------------------------------
     Reporter:  jarshwah             |                    Owner:  jarshwah
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  1.8alpha1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by akaariai):

 * stage:  Unreviewed => Accepted


Comment:

 My current feeling is that we could perhaps do this in as_sql() for those
 backends that need it. So, StdDev.as_sql() would read something like:
 {{{
 def as_sql(self, compiler, connection):
     connection.check_support(self)
     <original code>
 }}}

 While it is a bit ugly to check the support in as_sql(), this would allow
 us to avoid any overhead for those expressions that do not need the check.
 There is a justification for this, too. The as_sql() method should throw
 an error if there is no way to generate SQL for the given connection.

--
Ticket URL: <https://code.djangoproject.com/ticket/24154#comment:1>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1e6351ce6ed5346808849917511996a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to