[Dbix-class] DBIx::Class column list

Ryan D Johnson ryandjohnson at gmail.com
Sat Mar 8 19:05:20 GMT 2008


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



More information about the DBIx-Class mailing list