[CDBI] Order of columns returned by "columns"

Will Hawes will at pondwood.com
Tue Nov 8 08:41:45 GMT 2005


_____  

From: Ken Youens-Clark [mailto:kyclark at gmail.com]
To: classdbi at lists.digitalcraftsmen.net
Sent: Mon, 07 Nov 2005 23:44:09 +0000
Subject: [CDBI] Order of columns returned by "columns"

Hi,

Is it possible to get the columns returned by Class::DBI::columns to  
be in the same order that I define them?  I see in the  
Class::DBI::ColumnGrouper module that it's storing the columns in a  
hash and calling "values" on that.
  One workaround is to define a method in your CDBI class as follows:
  
  sub ordered_columns {
    qw/columns in the order you want them/;
  }
  
  Then use $class->ordered_columns instead of $class->columns when you need the order to be guaranteed.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digitalcraftsmen.net/mailman/private/classdbi/attachments/20051108/ae1aaf53/attachment.html


More information about the ClassDBI mailing list