#33790: Add more database functions/aggregates.
-------------------------------------+-------------------------------------
Reporter: zarinpy | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: orm | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => wontfix
Comment:
Most of functions/aggregates mentioned in the ticket description are
included in Django:
- `bit_xor()` -> `django.contrib.postgres.aggregates.BitXor`,
- `bool_and()` -> `django.contrib.postgres.aggregates.BoolAnd`,
- `covar_samp()` -> `django.contrib.postgres.aggregates.CovarPop` (with
`sample=True`),
- `stddev_pop()` -> `django.db.models.StdDev`.
As far as I'm aware after implementing #28643 we don't want to add more
functions to the core unless they are common and supported by all
backends. The current thread is to keep Django a core framework, not
providing every utility which might be useful. You can write your own
function, e.g.
{{{#!python
class Cbrt(Transform):
function = "CBRT"
lookup_name = "cbrt"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33790#comment:3>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018171358285-3508d394-4c0d-418d-b91f-62db663ecf80-000000%40eu-central-1.amazonses.com.