Hi list, The thread about reimplementing the date-based lookups[1] reminded me of something that was bugging me a couple of days ago.
There's some overlap between Funcs (of arity 1) and Transforms. They seem to fundamentally do the same thing – wrap an expression in some arbitrary SQL – but with a different interface. It seems wrong that some functionality can be tied up in a Transform and not available as a Func, and vice-versa. For instance, the built-in Length function isn't available as a transform, and the built-in contrib.postgres Unaccent transform isn't available as a function. It would be good to be able to easily register functions of arity 1 as transforms, using a decorator for example, to make them available in both contexts. Can all possible transforms be defined like this? That is, are transforms strictly a special case of functions or can they do more? Cheers, Alex [1] https://groups.google.com/forum/#!topic/django-developers/WYWrQkBJ2hs -- 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 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/79cf613b-d576-4e51-92fd-8c0b5ed60e93%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.