[Dbix-class] DBIx::Class column list

xyon xyon at indigorobot.com
Sat Mar 8 23:01:13 GMT 2008


Precisely it, thank you!

Is there documentation somewhere addressing this that I could have
looked at before posting to the list?

Thanks so much.

On Sat, 2008-03-08 at 11:05 -0800, Ryan D Johnson wrote:
> xyon <xyon at indigorobot.com> writes:
> 
> > I just want to fetch the column names.  Below is essentially what I
> > want to do (but it obviously doesn't work;)):
> >
> > my @columns	= $schema->resultset('data')->columns;
> 
> Is this what you're looking for:
> 
> $ $schema->resultset('User')->result_source->columns;
> $ARRAY1 = [
>             'id',
>             'email',
>             'username',
>             'password',
>             'signup_time',
>             'activation_code',
>             'invitations_left'
>           ];
> 
> /rdj
> 
> _______________________________________________
> 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.rawmode.org




More information about the DBIx-Class mailing list