[Dbix-class] Controlling column order

Will Hawes info at whawes.co.uk
Thu Jan 12 20:08:16 CET 2006


Matt S Trout wrote:
> On Thu, Jan 12, 2006 at 10:33:56AM +0000, Will Hawes wrote:
>> Matt S Trout wrote:
>>> On Wed, Jan 11, 2006 at 01:16:12PM -0600, Brandon Black wrote:
>>>> On 1/11/06, Will Hawes <info at whawes.co.uk> wrote:
>>>>> Is it possible to control the order in which columns are returned from a
>>>>> DBIx::Class object?
>>>>>
>>>> You mean from DBIx::Class::Table->columns?  Perhaps this should be an
>>>> optional column_info attribute (sort_order?) that ->columns looks at.
>>> or maybe just make the internal hash an IxHash like primaries do. Not sure
>>> what the performance impact of this would be though.
>>>
>> I thought something along the lines of the attached patch (to SVN 
>> revision 462) might be useful here.
> 
> Why the classaccessor rather than creating _ordered_columns as part of the
> simple group along with everything else?

I did try that, but for some reason it made several of the cdbi tests 
crap out.




More information about the Dbix-class mailing list