On Thu, Jan 29, 2009 at 4:14 AM, Russell Keith-Magee
<[email protected]> wrote:
>
> Hi all,
>
> With [9792], I've committed F() query expressions to trunk. For
> details, see the docs:

Hi Russell,

First, my apologies for not testing this with Oracle sooner.  It
appears that nobody else tested it either, because there are some
issues - specifically, Oracle doesn't have the expected %, &, and |
operators.

In order to get this working, it looks like we're going to need to do
some refactoring to push the expression evaluation code into
connection.ops, since currently 1) the operators are hard-coded into
the ExpressionNode class, and 2) the evaluation needs to be flexible
enough to allow function calls in place of operators.  Do you have any
suggestions for approaching this task?

The bit-wise or operator presents a third obstacle, since Oracle
annoyingly doesn't even provide a function for that; it's customarily
implemented as a user-defined function.  Since we're not currently in
the habit of installing custom functions for Django, the means of
accomplishing that is an open question.  As a stopgap measure, we
could implement `x | y` as `x + y - (x & y)`, with all the usual
caveats that double evaluation implies.

Regards,
Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to