[Dbix-class] Ordered columns and data type ...

Octavian Râşniţă octavian at fcc.ro
Fri Dec 25 15:32:41 GMT 2009


From: "Kiffin Gish" <kiffin.gish at planet.nl>
> Is there a way to get an array of ordered column names from a given row
> object?

my @columns = $row->columns;

> How do I get the data type of a given column?

my $row = $schema->resultset('TheResultSet')->search({},{rows => 1})->first;

my @columns = $row->columns;

for(@columns) {
print "Col: $_\n";
my $info = $t->column_info($_);

print Dumper($info) . "\n\n";
}

HTH.

Octavian




More information about the DBIx-Class mailing list