summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHannes Ljungberg <hannes@5monkeys.se>2020-03-20 23:08:32 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-03-25 10:16:30 +0100
commitf3da09df0f4147223ab76a00a841586ccf11005d (patch)
treee36e8116a5b7abaa453791545a65e3febe3adc87 /docs
parent39e1c88de67ea2035d5ad89cfe00bcd892c0d163 (diff)
Fixed #31396 -- Added binary XOR operator to F expressions.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/3.1.txt3
-rw-r--r--docs/topics/db/queries.txt10
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index 630dd4bc35..6cbdac4a1e 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -338,6 +338,9 @@ Models
* The new ``is_dst`` parameter of the :meth:`.QuerySet.datetimes` determines
the treatment of nonexistent and ambiguous datetimes.
+* The new :class:`~django.db.models.F` expression ``bitxor()`` method allows
+ :ref:`bitwise XOR operation <using-f-expressions-in-filters>`.
+
Pagination
~~~~~~~~~~
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 79f38084fa..415d229b02 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -656,10 +656,18 @@ that were modified more than 3 days after they were published::
>>> Entry.objects.filter(mod_date__gt=F('pub_date') + timedelta(days=3))
The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
-``.bitrightshift()``, and ``.bitleftshift()``. For example::
+``.bitxor()``, ``.bitrightshift()``, and ``.bitleftshift()``. For example::
>>> F('somefield').bitand(16)
+.. admonition:: Oracle
+
+ Oracle doesn't support bitwise XOR operation.
+
+.. versionchanged:: 3.1
+
+ Support for ``.bitxor()`` was added.
+
The ``pk`` lookup shortcut
--------------------------