#28643: Complete the ORM Function Library
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: JunyiJ
Type: New feature | Status: assigned
Component: Database layer | Version: master
(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
-------------------------------------+-------------------------------------
Comment (by felixxm):
I prepared patch to reorganize database functions docs and code
([https://github.com/django/django/pull/9227 PR]). I think we should
organize code and doc as follows (bolded functions doesn't exist):
- `docs/ref/models/database-functions.txt` main section
(`django/db/models/functions/misc.py`):
- ''**Ascii**, Cast, **Chr**, Coalesce, Greatest, Least, Now'';
- `docs/ref/models/database-functions.txt` section `Date Functions`
(`django/db/models/functions/datetime.py`):
- ''Extract, ExtractDay, ExtractHour, ExtractMinute, ExtractMonth,
ExtractQuarter, ExtractSecond, ExtractWeek, ExtractWeekDay, ExtractYear,
Trunc, TruncDate, TruncDay, TruncHour, TruncMinute, TruncMonth,
TruncQuarter, TruncSecond, TruncTime, TruncYear;';
- `docs/ref/models/database-functions.txt` section `Math Functions`
(`django/db/models/functions/math.py`):
- ''**Abs**, **Acos**, **Asin**, **Atan**, **Atan2**, **Ceil**, **Cos**,
**Cot**, **Exp**, **Floor**, **Log**, **Mod**, **Sin**, **Sqrt**,
**Tan**'';
- `docs/ref/models/database-functions.txt` section `Text Functions`
(`django/db/models/functions/text.py`):
- ''Concat, ConcatPair, Length, **Lpad**, Lower, **Ltrim**, **Power**,
**Replace**, **Round**, **Rpad**, **Rtrim**, StrIndex, Substr, **Trim**,
Upper'';
- `docs/ref/models/database-functions.txt` section `Window Functions`
(`django/db/models/functions/window.py`):
- ''CumeDist, DenseRank, FirstValue, Lag, LastValue, Lead, NthValue,
Ntile, PercentRank, Rank, RowNumber''.
Headers and functions in docs and code should be organized alphabetically.
Thanks Tim Graham for suggestions.
I'm not convince that following functions should be implemented because
there not supported on all databases:
- LEFT(), MD5(), REPEAT(), REVERSE(), RIGHT(), DEGREES(), PI(), RADIANS().
--
Ticket URL: <https://code.djangoproject.com/ticket/28643#comment:9>
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/064.47eb4c7cc132c342635026077b001f74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.