From bd47b9bc816bf213b6d0027ed9a9a44955bb7694 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Fri, 23 Jul 2021 16:57:26 +0100 Subject: Fixed #32961 -- Added BitXor() aggregate to django.contrib.postgres. --- docs/ref/contrib/postgres/aggregates.txt | 10 ++++++++++ docs/releases/4.1.txt | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt index cc177aca87..7c901a0bad 100644 --- a/docs/ref/contrib/postgres/aggregates.txt +++ b/docs/ref/contrib/postgres/aggregates.txt @@ -75,6 +75,16 @@ General-purpose aggregation functions Returns an ``int`` of the bitwise ``OR`` of all non-null input values, or ``default`` if all values are null. +``BitXor`` +---------- + +.. versionadded:: 4.1 + +.. class:: BitXor(expression, filter=None, default=None, **extra) + + Returns an ``int`` of the bitwise ``XOR`` of all non-null input values, or + ``default`` if all values are null. It requires PostgreSQL 14+. + ``BoolAnd`` ----------- diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 8401103767..e089ea6cf9 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -64,7 +64,9 @@ Minor features :mod:`django.contrib.postgres` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* ... +* The new :class:`BitXor() ` + aggregate function returns an ``int`` of the bitwise ``XOR`` of all non-null + input values. :mod:`django.contrib.redirects` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3