mirror of
https://github.com/django/django.git
synced 2025-07-23 13:15:32 +00:00
Fixed #31396 -- Added binary XOR operator to F expressions.
This commit is contained in:
parent
39e1c88de6
commit
f3da09df0f
8 changed files with 44 additions and 4 deletions
|
@ -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
|
||||
--------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue