On Mon, Jun 9, 2014 at 7:48 PM, Josh Smeaton <josh.smea...@gmail.com> wrote:

> - should expressions in order_by support random ordering (?) ? I don't
> think so, but I haven't ever had a need for random ordering so I'm not sure.
>

It should be possible to create an expression for order_by that essentially
does this, at least for simpler databases that support an ORDER BY RAND().
E.g. .order_by(Random())


> > I haven't yet implemented the LowerCase and related functions
>
> I think we can build out a handy little library of utility functions like
> Lower and Coalesce that could(should) be included directly in django. But
> it'll also open up, to library developers, the ability to easily develop
> backend specific structures, similar to parts of the
> django.contrib.postgres kickstarter.
>

Anything utility functions included in core need a way for 3rd party
backends to flag as not supported or be able to tweak the underlying SQL.
The most likely tweak would be renaming the function to match the specifics
of the database. I have to do this for some of the aggregation functions,
so it's safe to assume that some database might need to do the same for
order_by functions.

Regards,
Michael Manfre

-- 
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/CAGdCwBttFf3VbLWQiTqa29FSCAS2Yj8%2BSF6wmoNF5Sb7dqF3ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to