Re: [Django] #28643: Complete the ORM Function Library

2019-02-21 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  assigned => closed
 * resolution:   => fixed


Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`NullIf`||`NULLIF`||Returns `NULL` if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||~~9543~~||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Abs`||`ABS`||Returns the absolute value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`ACos`||`ACOS`||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ASin`||`ASIN`||Returns the arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan`||`ATAN`||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan2`||`ATAN2`||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ceil`||`CEILING`||Returns the smallest integer value that is not less
> than a numeric expression||‎✔||`CEIL`||‎✔||✔**^1^**||~~9622~~||
> ||`Cos`||`COS`||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Cot`||`COT`||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||`Degrees`||`DEGREES`||Returns a numeric expression converted from
> radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Exp`||`EXP`||Returns the base of the natural logarithm (e) raised to
> the power of a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Floor`||`FLOOR`||Returns the largest integer value that is not greater
> than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ln`||`LN`||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Log`||`LOG(B, X)`||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Mod`||`MOD`||Returns the remainder of one expression by diving by
> another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Pi`||`PI`||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||`Power`||`POWER`||Returns the value of one expression raised to the
> power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Radians`||`RADIANS`||Returns the value of an expression converted from
> degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Round`||`ROUND`||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`Sin`||`SIN`||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Sqrt`||`SQRT`||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Tan`||`TAN`||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Ord`||`ASCII`||Returns numeric value of left-most character.
> (Equivalent to `ord()` in Python.)||‎✔||‎✔||‎✔||`UNICODE`||~~9583~~||
> ||`Chr`||`CHR`||Character with the given
> code||‎✔||‎✔||`CHAR`||`CHAR`||~~9583~~||
> ||`Left`||`LEFT`||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> ||`LPad`||`LPAD`||Returns the string argument, left-padded with the
> specified string||‎✔||‎✔||‎✔||✔**^1^**||~~9798~~||
> ||`LTrim`||`LTRIM`||Removes leading spaces||‎✔||‎✔||‎✔||‎✔||~~9220~~||
> ||`MD5`||`MD5`||Calculates the MD5 hash of string, 

Re: [Django] #28643: Complete the ORM Function Library

2019-02-21 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"9ff18c08c32cf54d3c3a7a9e459d44711adba30f" 9ff18c08]:
 {{{
 #!CommitTicketReference repository=""
 revision="9ff18c08c32cf54d3c3a7a9e459d44711adba30f"
 Refs #28643 -- Added MD5 database function.

 Thanks Tim Graham, Nick Pope and Simon Charette for reviews.
 }}}

-- 
Ticket URL: 
Django 
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/064.838681d6085d8715d994f8a77282e60a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-02-19 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`NullIf`||`NULLIF`||Returns `NULL` if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||~~9543~~||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Abs`||`ABS`||Returns the absolute value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`ACos`||`ACOS`||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ASin`||`ASIN`||Returns the arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan`||`ATAN`||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan2`||`ATAN2`||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ceil`||`CEILING`||Returns the smallest integer value that is not less
> than a numeric expression||‎✔||`CEIL`||‎✔||✔**^1^**||~~9622~~||
> ||`Cos`||`COS`||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Cot`||`COT`||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||`Degrees`||`DEGREES`||Returns a numeric expression converted from
> radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Exp`||`EXP`||Returns the base of the natural logarithm (e) raised to
> the power of a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Floor`||`FLOOR`||Returns the largest integer value that is not greater
> than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ln`||`LN`||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Log`||`LOG(B, X)`||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Mod`||`MOD`||Returns the remainder of one expression by diving by
> another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Pi`||`PI`||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||`Power`||`POWER`||Returns the value of one expression raised to the
> power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Radians`||`RADIANS`||Returns the value of an expression converted from
> degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Round`||`ROUND`||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`Sin`||`SIN`||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Sqrt`||`SQRT`||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Tan`||`TAN`||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Ord`||`ASCII`||Returns numeric value of left-most character.
> (Equivalent to `ord()` in Python.)||‎✔||‎✔||‎✔||`UNICODE`||~~9583~~||
> ||`Chr`||`CHR`||Character with the given
> code||‎✔||‎✔||`CHAR`||`CHAR`||~~9583~~||
> ||`Left`||`LEFT`||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> ||`LPad`||`LPAD`||Returns the string argument, left-padded with the
> specified string||‎✔||‎✔||‎✔||✔**^1^**||~~9798~~||
> ||`LTrim`||`LTRIM`||Removes leading spaces||‎✔||‎✔||‎✔||‎✔||~~9220~~||
> ||`MD5`||`MD5`||Calculates the MD5 hash of string, returning the result
> in 

Re: [Django] #28643: Complete the ORM Function Library

2019-02-18 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Nick Pope):

 [https://github.com/django/django/pull/11006 PR] implementing `SHA1()`,
 `SHA224()`, `SHA256()`, `SHA384()` and `SHA512()`.

-- 
Ticket URL: 
Django 
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/064.cb0db3b21a152bf751fe096ffc45812c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-02-18 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/11004 PR]

-- 
Ticket URL: 
Django 
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/064.2a5f6be94bc256f0e406f3a695006d2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-02-18 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 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
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`NullIf`||`NULLIF`||Returns `NULL` if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||~~9543~~||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Abs`||`ABS`||Returns the absolute value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`ACos`||`ACOS`||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ASin`||`ASIN`||Returns the arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan`||`ATAN`||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`ATan2`||`ATAN2`||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ceil`||`CEILING`||Returns the smallest integer value that is not less
> than a numeric expression||‎✔||`CEIL`||‎✔||✔**^1^**||~~9622~~||
> ||`Cos`||`COS`||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Cot`||`COT`||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||`Degrees`||`DEGREES`||Returns a numeric expression converted from
> radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Exp`||`EXP`||Returns the base of the natural logarithm (e) raised to
> the power of a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Floor`||`FLOOR`||Returns the largest integer value that is not greater
> than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Ln`||`LN`||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Log`||`LOG(B, X)`||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Mod`||`MOD`||Returns the remainder of one expression by diving by
> another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Pi`||`PI`||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||`Power`||`POWER`||Returns the value of one expression raised to the
> power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Radians`||`RADIANS`||Returns the value of an expression converted from
> degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Round`||`ROUND`||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||`Sin`||`SIN`||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Sqrt`||`SQRT`||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||`Tan`||`TAN`||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||`Ord`||`ASCII`||Returns numeric value of left-most character.
> (Equivalent to `ord()` in Python.)||‎✔||‎✔||‎✔||`UNICODE`||~~9583~~||
> ||`Chr`||`CHR`||Character with the given
> code||‎✔||‎✔||`CHAR`||`CHAR`||~~9583~~||
> ||`Left`||`LEFT`||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> ||`LPad`||`LPAD`||Returns the string argument, left-padded with the
> specified string||‎✔||‎✔||‎✔||✔**^1^**||~~9798~~||
> ||`LTrim`||`LTRIM`||Removes leading spaces||‎✔||‎✔||‎✔||‎✔||~~9220~~||
> ||`MD5`||`MD5`||Calculates the MD5 hash of string, returning the result
> in 

Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 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
-+-
Changes (by Tim Graham):

 * has_patch:  1 => 0


-- 
Ticket URL: 
Django 
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/064.82eac55b2744b5ebc16b3f434a15de3a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"e85afa5943695457c85e9bc1c5dc0d985004e303" e85afa59]:
 {{{
 #!CommitTicketReference repository=""
 revision="e85afa5943695457c85e9bc1c5dc0d985004e303"
 Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin.

 Keeps precision instead of forcing DecimalField to FloatField.
 }}}

-- 
Ticket URL: 
Django 
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/064.273cc11f4d0d633306735c88450dfbe8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d" 6d4efa8e]:
 {{{
 #!CommitTicketReference repository=""
 revision="6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d"
 Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.

 Keeps precision instead of forcing DecimalField to FloatField.
 }}}

-- 
Ticket URL: 
Django 
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/064.c2e226678c18ae248d532173267c170b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"3d5e0f8394688d40036e27cfcfac295e6fe62269" 3d5e0f83]:
 {{{
 #!CommitTicketReference repository=""
 revision="3d5e0f8394688d40036e27cfcfac295e6fe62269"
 Refs #28643 -- Moved db function mixins to a separate module.
 }}}

-- 
Ticket URL: 
Django 
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/064.494f42d5a15d7d0995b3ef4429324593%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"c690afb873cac8035a3cb3be7c597a5ff0e4b261" c690afb8]:
 {{{
 #!CommitTicketReference repository=""
 revision="c690afb873cac8035a3cb3be7c597a5ff0e4b261"
 Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.

 Keeps precision instead of forcing DecimalField to FloatField.
 }}}

-- 
Ticket URL: 
Django 
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/064.3b24ff21670ceffa12b2bcdb968bf136%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-14 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"846624ed0858aec0e51baebaa5b397e135c6d1dc" 846624ed]:
 {{{
 #!CommitTicketReference repository=""
 revision="846624ed0858aec0e51baebaa5b397e135c6d1dc"
 Refs #28643 -- Extracted DurationField logic for Avg() and Sum() into
 mixin.

 Also addresses Sum() not handling the filter option correctly.
 }}}

-- 
Ticket URL: 
Django 
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/064.15574de44c20111933b1343cd68b805a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-12 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Tim Graham:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Sqrt}}}||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Tan}}}||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Ord}}}||{{{ASCII}}}||Returns numeric value of left-most character.
> (Equivalent to {{{ord()}}} in
> Python.)||‎✔||‎✔||‎✔||{{{UNICODE}}}||~~9583~~||
> ||{{{Chr}}}||{{{CHR}}}||Character with the given
> code||‎✔||‎✔||{{{CHAR}}}||{{{CHAR}}}||~~9583~~||
> ||{{{Left}}}||{{{LEFT}}}||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> 

Re: [Django] #28643: Complete the ORM Function Library

2019-01-12 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"abf8e390a4161a051ed1c4be11b9447866b06ba8" abf8e390]:
 {{{
 #!CommitTicketReference repository=""
 revision="abf8e390a4161a051ed1c4be11b9447866b06ba8"
 Refs #28643 -- Added Reverse database function.

 Thanks Mariusz Felisiak for Oracle advice and review.
 }}}

-- 
Ticket URL: 
Django 
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/064.0132819c4bb31e07b57b7f21a733be5e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-10 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"4b9d72210f0201efeafb9703e166aa3b38c04873" 4b9d7221]:
 {{{
 #!CommitTicketReference repository=""
 revision="4b9d72210f0201efeafb9703e166aa3b38c04873"
 Refs #28643 -- Added NullIf database function.

 Thanks Nick Pope, Mariusz Felisiak, and Tim Graham for reviews.
 }}}

-- 
Ticket URL: 
Django 
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/064.eabf097065292ad1d5486675a76a8324%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2019-01-08 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Nick Pope:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Sqrt}}}||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Tan}}}||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Ord}}}||{{{ASCII}}}||Returns numeric value of left-most character.
> (Equivalent to {{{ord()}}} in
> Python.)||‎✔||‎✔||‎✔||{{{UNICODE}}}||~~9583~~||
> ||{{{Chr}}}||{{{CHR}}}||Character with the given
> code||‎✔||‎✔||{{{CHAR}}}||{{{CHAR}}}||~~9583~~||
> ||{{{Left}}}||{{{LEFT}}}||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> 

Re: [Django] #28643: Complete the ORM Function Library

2019-01-08 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to it.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to degrees.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another expression.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||~~9622~~||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another expression||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||~~9622~~||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Sqrt}}}||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> ||{{{Tan}}}||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||~~9622~~||
> = **Text** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Ord}}}||{{{ASCII}}}||Returns numeric value of left-most character.
> (Equivalent to {{{ord()}}} in
> Python.)||‎✔||‎✔||‎✔||{{{UNICODE}}}||~~9583~~||
> ||{{{Chr}}}||{{{CHR}}}||Character with the given
> code||‎✔||‎✔||{{{CHAR}}}||{{{CHAR}}}||~~9583~~||
> ||{{{Left}}}||{{{LEFT}}}||Returns the leftmost number of characters as
> specified||‎✔||✔**^2, 6^**||‎✔||✔**^2^**||~~9583~~||
> ||{{{LPad}}}||{{{LPAD}}}||Returns the string argument, 

Re: [Django] #28643: Complete the ORM Function Library

2019-01-08 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  Nick Pope
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Nick Pope):

 * owner:  JunyiJ => Nick Pope
 * needs_better_patch:  1 => 0


Comment:

 I have added a new [https://github.com/django/django/pull/10764 PR] that
 cleans up some of the compatibility mixins added as part of the math
 function work so that they can be reused.
 It also makes use of these mixins for aggregates defined in
 `django.db.models.aggregates`.

-- 
Ticket URL: 
Django 
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/064.93903a78d5dc16e53d2c2f4930d7882b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-11-30 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"c3bbf1fd4cc73cf0f6109c81f2e44d44a4e25a0b" c3bbf1fd]:
 {{{
 #!CommitTicketReference repository=""
 revision="c3bbf1fd4cc73cf0f6109c81f2e44d44a4e25a0b"
 Refs #28643 -- Skipped ATan2() workaround on SpatiaLite 5+.
 }}}

-- 
Ticket URL: 
Django 
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/064.b7cc3943936fefc7d4edf9539baee837%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-08-15 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Nick Pope:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in

Re: [Django] #28643: Complete the ORM Function Library

2018-07-05 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"a0b19a0f5b1731cf575546175034da53f5af5367" a0b19a0]:
 {{{
 #!CommitTicketReference repository=""
 revision="a0b19a0f5b1731cf575546175034da53f5af5367"
 Refs #28643 -- Added math database functions.

 Thanks Nick Pope for much review.
 }}}

-- 
Ticket URL: 
Django 
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/064.ef6366295706b21d0dd97c79802d77fd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-06-29 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


-- 
Ticket URL: 
Django 
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/064.479362f561e7e93f4eb7530316c90a0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-04-03 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in
> 

Re: [Django] #28643: Complete the ORM Function Library

2018-04-03 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"55cc26941a1eb6093bf9602e67a2b5fdf7e68683" 55cc269]:
 {{{
 #!CommitTicketReference repository=""
 revision="55cc26941a1eb6093bf9602e67a2b5fdf7e68683"
 Refs #28643 -- Added Repeat database function.

 Thanks Tim Graham and Nick Pope for reviews.
 }}}

-- 
Ticket URL: 
Django 
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/064.a0164ea7b557e08009f538307caecbec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-03-23 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> = **Comparison** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NullIf}}}||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument
> equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> = **Math** =||
> ||**Django**||**SQL**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{Abs}}}||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ACos}}}||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASin}}}||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan}}}||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATan2}}}||{{{ATAN2}}}||Returns the arctangent of the two variables
> passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ceil}}}||{{{CEILING}}}||Returns the smallest integer value that is
> not less than a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cos}}}||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Cot}}}||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔**^5^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Degrees}}}||{{{DEGREES}}}||Returns a numeric expression converted
> from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Exp}}}||{{{EXP}}}||Returns the base of the natural logarithm (e)
> raised to the power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Floor}}}||{{{FLOOR}}}||Returns the largest integer value that is not
> greater than a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Ln}}}||{{{LN}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Log}}}||{{{LOG(B, X)}}}||Returns the logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Mod}}}||{{{MOD}}}||Returns the remainder of one expression by diving
> by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Pi}}}||{{{PI}}}||Returns the value of
> π||‎✔||✔**^4^**||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Power}}}||{{{POWER}}}||Returns the value of one expression raised to
> the power of another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Radians}}}||{{{RADIANS}}}||Returns the value of an expression
> converted from degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Round}}}||{{{ROUND}}}||Returns a numeric expression rounded to an
> integer.\\Can be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{Sin}}}||{{{SIN}}}||Returns the sine given in
> 

Re: [Django] #28643: Complete the ORM Function Library

2018-03-22 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Nick Pope:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9577
> 9577], [https://github.com/django/django/pull/9622 9622]||
> ||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN2}}}||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{CEILING}}}||Returns the smallest integer value that is not less than
> a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{DEGREES}}}||Returns a numeric expression converted from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{EXP}}}||Returns the base of the natural logarithm (e) raised to the
> power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{FLOOR}}}||Returns the largest integer value that is not greater than
> a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{LOG}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{MOD}}}||Returns the remainder of one expression by diving by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{PI}}}||Returns the value of
> π||‎✔||-||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{POWER}}}||Returns the value of one expression raised to the power of
> another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{RADIANS}}}||Returns the value of an expression converted from
> degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ROUND}}}||Returns a numeric expression rounded to an integer.\\Can
> be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||= **Text** =||
> 

Re: [Django] #28643: Complete the ORM Function Library

2018-03-21 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9577
> 9577], [https://github.com/django/django/pull/9622 9622]||
> ||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN2}}}||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{CEILING}}}||Returns the smallest integer value that is not less than
> a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{DEGREES}}}||Returns a numeric expression converted from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{EXP}}}||Returns the base of the natural logarithm (e) raised to the
> power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{FLOOR}}}||Returns the largest integer value that is not greater than
> a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{LOG}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{MOD}}}||Returns the remainder of one expression by diving by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{PI}}}||Returns the value of
> π||‎✔||-||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{POWER}}}||Returns the value of one expression raised to the power of
> another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{RADIANS}}}||Returns the value of an expression converted from
> degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ROUND}}}||Returns a numeric expression rounded to an integer.\\Can
> be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||= **Text** =||
> 

Re: [Django] #28643: Complete the ORM Function Library

2018-03-19 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"cede5111bbeea1f02a7d35941a4264c7ff95df0a" cede5111]:
 {{{
 #!CommitTicketReference repository=""
 revision="cede5111bbeea1f02a7d35941a4264c7ff95df0a"
 Refs #28643 -- Added LPad and RPad database functions.

 Thanks Tim Graham for the review.
 }}}

-- 
Ticket URL: 
Django 
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/064.521763d851cf03431aa487a9823b1220%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-03-18 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{NULLIF}}}||Returns {{{NULL}}} if the first argument equals the
> second.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9543
> 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||{{{ABS}}}||Returns the absolute
> value.||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9577
> 9577], [https://github.com/django/django/pull/9622 9622]||
> ||{{{ACOS}}}||Returns the
> arccosine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ASIN}}}||Returns the
> arcsine.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN}}}||Returns the
> arctangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ATAN2}}}||Returns the arctangent of the two variables passed to
> it.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{CEILING}}}||Returns the smallest integer value that is not less than
> a numeric
> expression||‎✔||{{{CEIL}}}||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COS}}}||Returns the cosine expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{COT}}}||Returns the
> cotangent.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{DEGREES}}}||Returns a numeric expression converted from radians to
> degrees.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{EXP}}}||Returns the base of the natural logarithm (e) raised to the
> power of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{FLOOR}}}||Returns the largest integer value that is not greater than
> a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{LOG}}}||Returns the natural logarithm of a numeric
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{MOD}}}||Returns the remainder of one expression by diving by another
> expression.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{PI}}}||Returns the value of
> π||‎✔||-||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{POWER}}}||Returns the value of one expression raised to the power of
> another
> expression||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{RADIANS}}}||Returns the value of an expression converted from
> degrees to
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{ROUND}}}||Returns a numeric expression rounded to an integer.\\Can
> be used to round an expression to a number of decimal
> points||‎✔||‎✔||‎✔||‎✔||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SIN}}}||Returns the sine given in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{SQRT}}}||Returns the square
> root.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||{{{TAN}}}||Returns the tangent expressed in
> radians.||‎✔||‎✔||‎✔||✔**^1^**||[https://github.com/django/django/pull/9622
> 9622]||
> ||= **Text** =||
> 

Re: [Django] #28643: Complete the ORM Function Library

2018-03-15 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"9421aee35e629f610ca739f13f7e37c1af27c1ac" 9421aee]:
 {{{
 #!CommitTicketReference repository=""
 revision="9421aee35e629f610ca739f13f7e37c1af27c1ac"
 Refs #28643 -- Added LTrim, RTrim, and Trim database functions.

 Thanks Tim Graham and Mads Jensen for reviews.
 }}}

-- 
Ticket URL: 
Django 
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/064.ee13a862ba7591db7fb7b7333db923e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-02-23 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"f82de6bfb1c3dc468f6eb7472b292cc432d00338" f82de6bf]:
 {{{
 #!CommitTicketReference repository=""
 revision="f82de6bfb1c3dc468f6eb7472b292cc432d00338"
 Refs #28643 -- Added Ord, Chr, Left, and Right database functions.
 }}}

-- 
Ticket URL: 
Django 
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/064.2bf92807bb70cf5260128778d70748b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-01-31 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Nick Pope:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||[https://github.com/django/django/pull/9543 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ABS()||Returns the absolute
> value.||X||X||X||X||[https://github.com/django/django/pull/9577 9577]||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer.\\Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||
> ||= **Text** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ASCII() (In Python, it is ord())||Returns numeric value of left-most
> character||X||X||X||as
> UNICODE()||[https://github.com/django/django/pull/9583 9583]||
> ||CHR()||Character with the given code||X||X||as CHAR()||as
> CHAR()||[https://github.com/django/django/pull/9583 9583]||
> ||LEFT()||Returns the leftmost number of characters as specified||X||as
> SUBSTR()||X||as SUBSTR()||[https://github.com/django/django/pull/9583
> 9583]||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified
> string||X||X||X||X||[https://github.com/django/django/pull/9539 9539]||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of characters||X||as
> SUBSTR()||X||as SUBSTR()||[https://github.com/django/django/pull/9583
> 9583]||
> ||RPAD()||Appends string the specified number of 

Re: [Django] #28643: Complete the ORM Function Library

2018-01-17 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"65728550bd6296871562da02069ddb86e9dd3482" 65728550]:
 {{{
 #!CommitTicketReference repository=""
 revision="65728550bd6296871562da02069ddb86e9dd3482"
 Refs #28643 -- Added Replace database function.
 }}}

-- 
Ticket URL: 
Django 
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/064.aeb1c909153fb91efdbd2444e647dc07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-01-17 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Matthew Pava):

 I added a link to the Ord, Chr, Left, and Right PR.

 I just started thinking more about the Left and Right aspects, and it
 occurred to me that a more pythonic solution would be the implementation
 of slicing instead of having these separate database functions.  This
 would also change the implementation of Substr since that would no longer
 be necessary either.

-- 
Ticket URL: 
Django 
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/064.e1e9172588bcfa78d5a0460aeb12f742%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-01-13 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Thomas Lagae):

 When passing a non-numeric value into the {{{Abs}}} function, the
 behaviour differs between databases. I think this will also be the case
 for other math functions. Should we catch non-numeric values and throw an
 error or just document that this behaviour is undefined and differs
 between databases?

-- 
Ticket URL: 
Django 
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/064.e42de2f74de0e7109563e6efda911ba4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2018-01-12 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Matthew Pava:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||[https://github.com/django/django/pull/9543 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ABS()||Returns the absolute
> value.||X||X||X||X||[https://github.com/django/django/pull/9577 9577]||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer.\\Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||
> ||= **Text** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified
> string||X||X||X||X||[https://github.com/django/django/pull/9539 9539]||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||

New description:

 I was 

Re: [Django] #28643: Complete the ORM Function Library

2018-01-12 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Thomas Lagae):

 * cc: Thomas Lagae (added)


Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||[https://github.com/django/django/pull/9543 9543]||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ABS()||Returns the absolute value.||X||X||X||X||-||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer.\\Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||
> ||= **Text** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified
> string||X||X||X||X||[https://github.com/django/django/pull/9539 9539]||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||

New description:

 I was surprised to learn that we 

Re: [Django] #28643: Complete the ORM Function Library

2018-01-05 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||-||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ABS()||Returns the absolute value.||X||X||X||X||-||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer.\\Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||
> ||= **Text** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified
> string||X||X||X||X||[https://github.com/django/django/pull/9539 9539]||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder 

Re: [Django] #28643: Complete the ORM Function Library

2018-01-04 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Mads Jensen:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||-||
> ||= **Math** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ABS()||Returns the absolute value.||X||X||X||X||-||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer.\\Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||
> ||= **Text** =||
> ||**Name**||**Description**||**PostgreSQL**||**Oracle**||**MySQL**||**SQLite**||**PR**||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified string||X||X||X||X||-||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder how
 users 

Re: [Django] #28643: Complete the ORM Function Library

2017-12-21 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Nick Pope:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= **Comparison** =||
> ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
> ||NULLIF()||Returns NULL if the first argument equals the
> second.||X||X||X||X||-||
> \\
> ||= **Text** =||
> ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified string||X||X||X||X||-||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> \\
> ||= **Math** =||
> ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
> ||ABS()||Returns the absolute value.||X||X||X||X||-||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer. Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder how
 users were using Substr without also finding a use for StrIndex this whole
 time.  

Re: [Django] #28643: Complete the ORM Function Library

2017-12-21 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist, with corresponding attributes to which
> backend has them available.
>
> ||= String =||
> ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
> ||ASCII()||Returns numeric value of left-most character||X||X||X||as
> UNICODE()||-||
> ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
> ||LEFT()||Returns the leftmost number of characters as
> specified||X||-||X||-||-||
> ||LPAD()||Returns the string argument, left-padded with the specified
> string||X||X||X||-||-||
> ||MD5()||Calculates the MD5 hash of string, returning the result in
> hexadecimal||X||-||-||-||-||
> ||REPEAT()||Repeats a string the specified number of
> times||X||-||X||-||-||
> ||REPLACE()||Replaces occurrences of a specified string||X||X||X||X||-||
> ||REVERSE()||Reverse the characters in a string||X||-||X||-||-||
> ||RIGHT()||Returns the specified rightmost number of
> characters||X||-||X||-||-||
> ||RPAD()||Appends string the specified number of times||X||X||X||-||-||
> ||LTRIM()||Removes leading
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||RTRIM()||Removes trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
> ||TRIM()||Removes leading and trailing
> spaces||X||X||X||X||[https://github.com/django/django/pull/9220 9220]||
>
> ||= Numeric =||
> ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
> ||ABS()||Returns the absolute value.||X||X||X||X||-||
> ||ACOS()||Returns the arccosine.||X||X||X||-||-||
> ||ASIN()||Returns the arcsine.||X||X||X||-||-||
> ||ATAN()||Returns the arctangent.||X||X||X||-||-||
> ||ATAN2()||Returns the arctangent of the two variables passed to
> it.||X||X||X||-||-||
> ||CEILING()||Returns the smallest integer value that is not less than a
> numeric expression||X||as CEIL()||X||-||-||
> ||COS()||Returns the cosine expressed in radians.||X||X||X||-||-||
> ||COT()||Returns the cotangent.||X||X||X||-||-||
> ||DEGREES()||Returns a numeric expression converted from radians to
> degrees.||X||X||X||-||-||
> ||EXP()||Returns the base of the natural logarithm (e) raised to the
> power of a numeric expression.||X||X||X||-||-||
> ||FLOOR()||Returns the largest integer value that is not greater than a
> numeric expression.||X||X||X||-||-||
> ||LOG()||Returns the natural logarithm of a numeric
> expression.||X||X||X||-||-||
> ||MOD()||Returns the remainder of one expression by diving by another
> expression.||X||X||X||-||-||
> ||PI()||Returns the value of pi||X||-||X||-||-||
> ||POWER()||Returns the value of one expression raised to the power of
> another expression||X||X||X||-||-||
> ||RADIANS()||Returns the value of an expression converted from degrees to
> radians.||X||X||X||-||-||
> ||ROUND()||Returns a numeric expression rounded to an integer. Can be
> used to round an expression to a number of decimal
> points||X||X||X||X||-||
> ||SIN()||Returns the sine given in radians.||X||X||X||-||-||
> ||SQRT()||Returns the square root.||X||X||X||-||-||
> ||TAN()||Returns the tangent expressed in radians.||X||X||X||-||-||

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder how
 users were using Substr without also finding a use for StrIndex this whole
 time.  Anyway, since we seem to be adding these functions one at a time,
 why don't we work on trying to get the built-ins implemented in one sweep
 instead?

 We may even want to split the documentation page
 

Re: [Django] #28643: Complete the ORM Function Library

2017-12-18 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist.  There are probably several more that I
> have missed.  These functions are available directly out of the box with
> PostgreSQL.
>
> String functions not yet implemented:
> ASCII(): Returns numeric value of left-most character
> CHR(): Character with the given code.
> LEFT(): Returns the leftmost number of characters as specified
> LPAD(): Returns the string argument, left-padded with the specified
> string
> MD5(): Calculates the MD5 hash of string, returning the result in
> hexadecimal
> REPEAT(): Repeats a string the specified number of times
> REPLACE(): Replaces occurrences of a specified string
> REVERSE(): Reverse the characters in a string
> RIGHT(): Returns the specified rightmost number of characters
> RPAD(): Appends string the specified number of times
> LTRIM(): Removes leading spaces
> ([https://github.com/django/django/pull/9220 PR #9220])
> RTRIM(): Removes trailing spaces
> ([https://github.com/django/django/pull/9220 PR #9220])
> TRIM(): Removes leading and trailing spaces
> ([https://github.com/django/django/pull/9220 PR #9220])
>
> Numeric functions:
> ABS(): Returns the absolute value.
> ACOS(): Returns the arccosine.
> ASIN(): Returns the arcsine.
> ATAN(): Returns the arctangent.
> ATAN2(): Returns the arctangent of the two variables passed to it.
> CEILING(): Returns the smallest integer value that is not less than a
> numeric expression
> COS(): Returns the cosine expressed in radians.
> COT(): Returns the cotangent.
> DEGREES(): Returns a numeric expression converted from radians to
> degrees.
> EXP(): Returns the base of the natural logarithm (e) raised to the power
> of a numeric expression.
> FLOOR(): Returns the largest integer value that is not greater than a
> numeric expression.
> LOG(): Returns the natural logarithm of a numeric expression.
> MOD(): Returns the remainder of one expression by diving by another
> expression.
> PI(): Returns the value of pi
> POWER(): Returns the value of one expression raised to the power of
> another expression
> RADIANS(): Returns the value of an expression converted from degrees to
> radians.
> ROUND(): Returns a numeric expression rounded to an integer. Can be used
> to round an expression to a number of decimal points
> SIN(): Returns the sine given in radians.
> SQRT(): Returns the square root.
> TAN(): Returns the tangent expressed in radians.

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder how
 users were using Substr without also finding a use for StrIndex this whole
 time.  Anyway, since we seem to be adding these functions one at a time,
 why don't we work on trying to get the built-ins implemented in one sweep
 instead?

 We may even want to split the documentation page
 (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
 into further categories with String functions and Numeric functions.

 This is just a sample checklist, with corresponding attributes to which
 backend has them available.

 ||= String =||
 ||Name||Description||PostgreSQL||Oracle||MySQL||SQLite||PR||
 ||ASCII()||Returns numeric value of left-most character||X||X||X||as
 UNICODE()||-||
 ||CHR()||Character with the given code||X||X||as CHAR()||as CHAR()||-||
 ||LEFT()||Returns the leftmost number of characters as
 specified||X||-||X||-||-||
 ||LPAD()||Returns the string argument, left-padded with the specified
 string||X||X||X||-||-||
 ||MD5()||Calculates the MD5 hash of string, returning the result in
 

Re: [Django] #28643: Complete the ORM Function Library

2017-11-30 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam (Chainz) Johnson):

 * cc: Adam (Chainz) Johnson (added)


-- 
Ticket URL: 
Django 
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/064.a9d7bcbc22d57ed47f0c444ddea21e59%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-11-14 Thread Django
#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:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
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/064.64021f089f68e005a43e82141a4f6017%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-19 Thread Django
#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):

 Replying to [comment:18 Matthew Pava]:
 > And, of course, there is a Python ''lstrip'' and ''rstrip'' as well.
 >
 > {{{
 > Lstrip = Ltrim  # Give Ltrim a more Pythonic name
 > Rstrip = Rtrim  # Give Rtrim a more Pythonic name
 > }}}

 I added these aliases.

-- 
Ticket URL: 
Django 
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/064.94a6277150b2cdc6fd12982a7519836c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-16 Thread Django
#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 Matthew Pava):

 And, of course, there is a Python ''lstrip'' and ''rstrip'' as well.

 {{{
 Lstrip = Ltrim  # Give Ltrim a more Pythonic name
 Rstrip = Rtrim  # Give Rtrim a more Pythonic name
 }}}

-- 
Ticket URL: 
Django 
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/064.259768f6ae67b9f94a5fa0a6854526b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-14 Thread Django
#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):

 [https://github.com/django/django/pull/9220 PR - Ltrim, Rtrim, Strip, and
 Trim.]

-- 
Ticket URL: 
Django 
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/064.81adc885d93f08512cd92f765321ebfa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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 GitHub ):

 In [changeset:"4f27e475b30d0cf91be24f3116a54b17789ac403" 4f27e475]:
 {{{
 #!CommitTicketReference repository=""
 revision="4f27e475b30d0cf91be24f3116a54b17789ac403"
 Refs #28643 -- Reorganized database functions.

 Thanks Tim Graham for the review.
 }}}

-- 
Ticket URL: 
Django 
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/064.3b753c15e0d160823f24969f0a1582c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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 Mariusz Felisiak ):

 In [changeset:"8b42a18b2d7bbd9e94ee80458a1cfcbb544e588c" 8b42a18b]:
 {{{
 #!CommitTicketReference repository=""
 revision="8b42a18b2d7bbd9e94ee80458a1cfcbb544e588c"
 [2.0.x] Refs #28643 -- Reorganized database functions docs.

 Thanks Tim Graham for the review.

 Backport of ad8036d715d4447b95d485332511b4edb1a40c0e from master
 }}}

-- 
Ticket URL: 
Django 
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/064.d37de21d4fff1bff0c7b4c9f530b612a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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 GitHub ):

 In [changeset:"ad8036d715d4447b95d485332511b4edb1a40c0e" ad8036d7]:
 {{{
 #!CommitTicketReference repository=""
 revision="ad8036d715d4447b95d485332511b4edb1a40c0e"
 Refs #28643 -- Reorganized database functions docs.

 Thanks Tim Graham for the review.
 }}}

-- 
Ticket URL: 
Django 
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/064.8d51dea27a5e9363fe7b910e121098bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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
-+-
Changes (by Shai Berger):

 * cc: Shai Berger (added)


Comment:

 Replying to [comment:12 Matthew Pava]:
 >
 > I was also wondering about the use of Trim.  Python doesn't use that
 term; instead, it uses strip.  I wonder if that really matters.  Some
 developers may look for a strip functionality in Django ORM not realizing
 that the databases use the term Trim.  Perhaps that could be clarified in
 the documentation.

 Unless there is some other use for the term `strip` in the databases, I'd
 consider "documenting" this by giving an alias:
 {{{
 class Trim(Transform):
 # ...

 Strip = Trim  # Give Trim a more Pythonic name
 }}}

-- 
Ticket URL: 
Django 
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/064.6184dbd9e330c38410628298e8f353bf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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 Matthew Pava):

 In regards to Left() and Right(), they are  available in PostgreSQL and
 MySQL, but not in SQLite or Oracle.  However, you can emulate their
 functionality using the corresponding Substr function in the database
 backend.  I would hate to see us leave those out for that reason alone.
 At the same time, developers could use the Substr across all databases
 instead of using Left and Right.

 I was also wondering about the use of Trim.  Python doesn't use that term;
 instead, it uses strip.  I wonder if that really matters.  Some developers
 may look for a strip functionality in Django ORM not realizing that the
 databases use the term Trim.  Perhaps that could be clarified in the
 documentation.

-- 
Ticket URL: 
Django 
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/064.753b30dd030e9ac54f7be63268d61cf8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-13 Thread Django
#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):

 Agreed. I updated above comment and both PRs.

-- 
Ticket URL: 
Django 
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/064.5c1e4ce8133f5fb960bbaec5ba9fcced%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-12 Thread Django
#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 Tim Graham):

 The "Miscellaneous" group is sort of bothering me.

 `Cast`, `Coalesce`, `Greatest`, `Least` sound like candidates for a
 section called something like "Comparison and conversion functions"

 `Ascii` and `Chr` sound like they could be "text" related.

 `Now` sounds like a candidate for "Date Functions".

-- 
Ticket URL: 
Django 
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/064.d4ff27877bb8c10cf936b6f642e43b4a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-11 Thread Django
#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: 
Django 
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/064.47eb4c7cc132c342635026077b001f74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-09 Thread Django
#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
-+-
Description changed by felixxm:

Old description:

> I was surprised to learn that we didn't have a StrIndex function until
> version 2, and yet we had Substr since at least version 1.8.  I wonder
> how users were using Substr without also finding a use for StrIndex this
> whole time.  Anyway, since we seem to be adding these functions one at a
> time, why don't we work on trying to get the built-ins implemented in one
> sweep instead?
>
> We may even want to split the documentation page
> (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
> into further categories with String functions and Numeric functions.
>
> This is just a sample checklist.  There are probably several more that I
> have missed.  These functions are available directly out of the box with
> PostgreSQL.
>
> String functions not yet implemented:
> ASCII(): Returns numeric value of left-most character
> CHR(): Character with the given code.
> LEFT(): Returns the leftmost number of characters as specified
> LPAD(): Returns the string argument, left-padded with the specified
> string
> LTRIM(): Removes leading spaces
> MD5(): Calculates the MD5 hash of string, returning the result in
> hexadecimal
> REPEAT(): Repeats a string the specified number of times
> REPLACE(): Replaces occurrences of a specified string
> REVERSE(): Reverse the characters in a string
> RIGHT(): Returns the specified rightmost number of characters
> RPAD(): Appends string the specified number of times
> RTRIM(): Removes trailing spaces
> TRIM(): Removes leading and trailing spaces
>
> Numeric functions:
> ABS(): Returns the absolute value.
> ACOS(): Returns the arccosine.
> ASIN(): Returns the arcsine.
> ATAN(): Returns the arctangent.
> ATAN2(): Returns the arctangent of the two variables passed to it.
> CEILING(): Returns the smallest integer value that is not less than a
> numeric expression
> COS(): Returns the cosine expressed in radians.
> COT(): Returns the cotangent.
> DEGREES(): Returns a numeric expression converted from radians to
> degrees.
> EXP(): Returns the base of the natural logarithm (e) raised to the power
> of a numeric expression.
> FLOOR(): Returns the largest integer value that is not greater than a
> numeric expression.
> LOG(): Returns the natural logarithm of a numeric expression.
> MOD(): Returns the remainder of one expression by diving by another
> expression.
> PI(): Returns the value of pi
> POWER(): Returns the value of one expression raised to the power of
> another expression
> RADIANS(): Returns the value of an expression converted from degrees to
> radians.
> ROUND(): Returns a numeric expression rounded to an integer. Can be used
> to round an expression to a number of decimal points
> SIN(): Returns the sine given in radians.
> SQRT(): Returns the square root.
> TAN(): Returns the tangent expressed in radians.

New description:

 I was surprised to learn that we didn't have a StrIndex function until
 version 2, and yet we had Substr since at least version 1.8.  I wonder how
 users were using Substr without also finding a use for StrIndex this whole
 time.  Anyway, since we seem to be adding these functions one at a time,
 why don't we work on trying to get the built-ins implemented in one sweep
 instead?

 We may even want to split the documentation page
 (https://docs.djangoproject.com/en/dev/ref/models/database-functions/)
 into further categories with String functions and Numeric functions.

 This is just a sample checklist.  There are probably several more that I
 have missed.  These functions are available directly out of the box with
 PostgreSQL.

 String functions not yet implemented:
 ASCII(): Returns numeric value of left-most character
 CHR(): Character with the given code.
 LEFT(): Returns the leftmost number of characters as specified
 LPAD(): Returns the string argument, left-padded with the specified string
 MD5(): Calculates the MD5 hash of string, returning the result in
 hexadecimal
 REPEAT(): Repeats a string the specified number of times
 REPLACE(): Replaces occurrences of a specified string
 REVERSE(): Reverse the characters in a string
 RIGHT(): Returns the specified rightmost number of characters
 RPAD(): 

Re: [Django] #28643: Complete the ORM Function Library

2017-10-06 Thread Django
#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 Mads Jensen):

 Replying to [comment:6 Matthew Pava]:
 > I did find this third-party utility that handles specific PostgreSQL
 functions.  I wonder if there are other backends that they could be ported
 to.
 > https://github.com/hypertrack/django-pg-utils

 From a quick look, these things are already supported by Django.

-- 
Ticket URL: 
Django 
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/064.61902a25846e5187dd56bcf1230de569%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-04 Thread Django
#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 Matthew Pava):

 I did find this third-party utility that handles specific PostgreSQL
 functions.  I wonder if there are other backends that they could be ported
 to.
 https://github.com/hypertrack/django-pg-utils

 And I also wonder how all of this connects with specific PostgreSQL
 aggregate functions already builtin to Django:
 https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/aggregates/

-- 
Ticket URL: 
Django 
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/064.4401b3a329c7edd8b61c52972b573481%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-01 Thread Django
#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 Josh Smeaton):

 For whoever wants to begin here, I think a good plan of attack will be a
 PR per function or per a small set of functions. Then the commit message
 would be something like "Refs #28643 -- Added X, Y, Z functions".

 That way we can get through smaller pieces at a time, without such a large
 burden being placed on any one individual. We could also get some newer
 contributors to help in this way. Each function on its own should be a
 relatively easy thing to implement. A higher level task of re-organising
 the layout into functions/string functions/number may be helpful to get
 the ticket rolling.

-- 
Ticket URL: 
Django 
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/064.195c30c4058cc6fedbdb14e9a5afd131%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-10-01 Thread Django
#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
-+-
Changes (by JunyiJ):

 * owner:  nobody => JunyiJ
 * status:  new => assigned


-- 
Ticket URL: 
Django 
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/064.5727f04d84391f20f1dd64189687e89f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-09-28 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  nobody
 Type:  New feature  |   Status:  new
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
-+-
Changes (by felixxm):

 * cc: felixxm (added)


-- 
Ticket URL: 
Django 
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/064.58ad2b20db8b2646e5540d7fd6325e1b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-09-27 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  nobody
 Type:  New feature  |   Status:  new
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
-+-
Changes (by Josh Smeaton):

 * cc: josh.smeaton@… (added)
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
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/064.adabdf24e682b5498fffe19b95cd0b3a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28643: Complete the ORM Function Library

2017-09-27 Thread Django
#28643: Complete the ORM Function Library
-+-
 Reporter:  Matthew Pava |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Josh Smeaton):

 I had hoped that the 3rd party community would take care of providing
 "Function Packs" for each of the backends. But functions are fairly easy
 to create in your own project if you need them so I guess few people have
 bothered to group them into a distributable package.

 I would prefer that the django ecosystem had a standard group of function
 expressions that can be used across backends, rather than a bunch of
 similar but not quite the same implementations. Then 3rd party libraries
 can depend on the known good versions and everyone is better off. Since
 the community hasn't seemed to provide such a library (that I'm aware of),
 I think it's fine for Django to do so.

 Splitting the module up into string/numeric/date types sounds fine. Let's
 take inspiration from postgres and other db vendor docs so navigating them
 is familiar. Let's begin with functions that have standard support across
 our 4 backends, then look into what's left over. If we can approximate
 support by combining other functions we can do that. Otherwise if a
 particular function only has support for one or two backends we can
 consider ignoring it or implementing in a contrib module.

-- 
Ticket URL: 
Django 
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/064.7ee47c703a413fb31fb3995c41725aec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.