From df8412d2e5c95fe8c8238ebde8e0dbb68fe2ec1d Mon Sep 17 00:00:00 2001 From: Rustam Kashapov Date: Sun, 15 May 2016 12:53:16 +0300 Subject: Fixed #26617 -- Added distinct argument to contrib.postgres's StringAgg. --- docs/ref/contrib/postgres/aggregates.txt | 9 ++++++++- docs/releases/1.11.txt | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt index 943b0b9373..f9b7be0fd3 100644 --- a/docs/ref/contrib/postgres/aggregates.txt +++ b/docs/ref/contrib/postgres/aggregates.txt @@ -61,7 +61,7 @@ General-purpose aggregation functions ``StringAgg`` ------------- -.. class:: StringAgg(expression, delimiter) +.. class:: StringAgg(expression, delimiter, distinct=False) Returns the input values concatenated into a string, separated by the ``delimiter`` string. @@ -70,6 +70,13 @@ General-purpose aggregation functions Required argument. Needs to be a string. + .. attribute:: distinct + + .. versionadded:: 1.11 + + An optional boolean argument that determines if concatenated values + will be distinct. Defaults to ``False``. + Aggregate functions for statistics ================================== diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index a2a427e7a4..9c162b41c4 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -81,7 +81,9 @@ Minor features :mod:`django.contrib.postgres` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* ... +* The new ``distinct`` argument for + :class:`~django.contrib.postgres.aggregates.StringAgg` determines if + concatenated values will be distinct. :mod:`django.contrib.redirects` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3