1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #23753 -- Added a suite of SQL Functions

Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
This commit is contained in:
Josh Smeaton
2014-11-22 14:14:43 +11:00
parent 7c07612e90
commit 4718296546
11 changed files with 550 additions and 3 deletions

View File

@@ -66,8 +66,8 @@ New data types
backends. There is a corresponding :class:`form field
<django.forms.DurationField>`.
Query Expressions
~~~~~~~~~~~~~~~~~
Query Expressions and Database Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:doc:`Query Expressions </ref/models/expressions>` allow users to create,
customize, and compose complex SQL expressions. This has enabled annotate
@@ -75,6 +75,12 @@ to accept expressions other than aggregates. Aggregates are now able to
reference multiple fields, as well as perform arithmetic, similar to ``F()``
objects.
A collection of :doc:`database functions </ref/models/database-functions>` is
also included with functionality such as
:class:`~django.db.models.functions.Coalesce`,
:class:`~django.db.models.functions.Concat`, and
:class:`~django.db.models.functions.Substr`.
``TestCase`` data setup
~~~~~~~~~~~~~~~~~~~~~~~