Hi!,
the summary of this ticket is:
add bit shift operators (concretely '>>' and '<<') to F(), then you can
use these operators like this:
- F('somefield').bitleftshift(16)
- F('somefield').bitrightshift(16)
The discussion of this ticket went in few ways:
1) We permit these operators in F(), and then we allow addition of
others methods too?
2) Move the bitand() and bitor() to expressions?
3) Or only allow bit shift and stop there. (Into this way there are
open other discussions):
3.1) situation->Oracle don't support bit shift operators,
but you can do some math to do it
3.1.1) Is a good idea to implement this
maths?
3.1.2) Or is better to raise
NotImplementedError("Bit-wise left/right is not supported in Oracle."),
because we want to follow the same design following by Django in other
cases like this? such as 'or' operator: (you can check the code):
In
django/django/db/backends/oracle/features.py
supports_bitwise_or
= False
In
django/django/db/backends/oracle/operations.py
def
combine_expression(self, connector, sub_expressions):
....
elif connector == '|':
raise
NotImplementedError("Bit-wise or is not supported in Oracle.")
The pull request has the solution 3.1.2, implement binary left/right shift
operators to F() and raise NotImplementedError for Oracle.
All opinions are welcome! thank you so much!
El sábado, 9 de julio de 2016, 17:09:53 (UTC+2), Tim Graham escribió:
>
> Hi, you're more likely to inspire a good discussion if you summarize the
> discussion on the ticket and offer your own opinion on the matter.
>
> On Saturday, July 9, 2016 at 10:31:33 AM UTC-4, Sarabia Cobo Belén wrote:
>>
>> Hello everyone,
>>
>> I create this thread to know if it is desired ticket 25919 or not?, or I
>> should close that pull request?
>>
>> Thank very much, and sorry for the inconvinients created.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/99f1f120-a935-4ff2-bc07-9f2f276c6414%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.