On Fri, Jan 30, 2009 at 3:39 PM, Ian Kelly <[email protected]> wrote:
> > 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 > > > > Ian, I think the best way to approach this might be the same way we do lookup types, just a dict on the ops class. Further, I think that just doing the double evaluation way is probably the best solution in terms of ease of use for users. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
