Hi, first post here I have a question regarding getting column names from a DBIx ::Class $resultset or $row.
I have a DBIx::Class resultset which I'll call $rset I need to get the column names of the resultset in the correct order. I was advised by a coleague to use $rset->result_source->columns; This have me the column names of the table that was the original source of the resultset which initially worked ok. However, now that I am doing some selects on the table the resultset only contains a subset of the table columns I tried doing my $row = $rset->first; %row = $row->get_columns; my @cols = keys %row; But now I dont have them in the correct order. Is there anyway to get an (ordered) list of the column names from the $resultset or the $row Thanks Tom -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
