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

Octavian Râşniţă octavian at fcc.ro
Fri Dec 25 22:30:20 GMT 2009


Yes, I copied that piece of code from one of my apps, and replaced $t with 
$row to be more clear, but I have forgotten to replace $t with $row 
everywhere.

Octavian

----- Original Message ----- 
From: "Kiffin Gish" <kiffin.gish at planet.nl>
To: "DBIx::Class user and developer list" <dbix-class at lists.scsys.co.uk>
Sent: Friday, December 25, 2009 10:18 PM
Subject: Re: [Dbix-class] Ordered columns and data type ...


What does $t refer to? $row?

On Fri, 2009-12-25 at 17:32 +0200, Octavian Râşniţă wrote:
> 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
>
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk


-- 
Kiffin Gish <Kiffin.Gish at planet.nl>
Gouda, The Netherlands



_______________________________________________
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/dbix-class@lists.scsys.co.uk




More information about the DBIx-Class mailing list