On Monday, 16 June 2014 01:25:45 UTC+1, Josh Smeaton wrote: > > Nice work, I think that's a lot better. The only thing that now worries me > is that order_by doesn't accept sql parameters for some reason. I'm not > sure how many expressions produce sql_params and if they'd be useful in an > ordering context. It might be worth looking into that a little more. >
Disallowing params was just a conservative default. I can't see any reason why this can't be made to work. However, I couldn't see any obvious expressions that would need to use parameters, and I was doubtful that it would be supported across all backends. I guess COALESCE(some_field, %s) could be useful in certain circumstances, or SUBSTRING(some_field, %s, %s). On the cross-platform issue, is the general pattern to allow params anywhere and just expose the error to the developer if they use an expression with parameters in a place that doesn't support it on their backend? I'm fine to follow that if it's the pattern. [Support for platform-dependence in function expressions] > Perhaps we can start another discussion on the ML so we can address these > concerns without it being hidden inside this thread? > Sounds good. Do you wan to start a new topic, since you understand the issue better than I do at the moment? Tim -- You received this message because you are subscribed to the Google Groups "Django developers" 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 http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/65823d1d-ba0c-428a-a541-d2214facfda7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
