[Dbix-class] quote char works with sorting without breaking too much!
Matt S Trout
dbix-class at trout.me.uk
Wed Jun 21 15:03:49 CEST 2006
Jess Robinson wrote:
> Ah, but this has fun with functions, which are currently supported as:
>
> order_by => [ { 'count' => '*'} ] .. etc
>
> At the last discussion of this, my end proposal was the following:
>
> order by => [ [ 'name', 'asc'], 'lastname', [ { sum => 'age' }, 'desc' ] ]
>
> That is, the items in order by can be either:
> 1) a plain fieldname, which will just get passed on
> 2) an arraryref of fieldname and order direction
> 3) an arraryref of functionhashref, and order direction
> 4) a function hashref
> 5) a scalar ref that will be passed on blind as before
>
> This, I hope, won't break current functionality.. or am I missing
> anything?
how about { -desc => 'colname' } ?
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list