Help for this page

Select Code to Download


  1. or download this
    package MyApp::Schema::Result::Artist;
    use base qw/DBIx::Class::Core/;
    ...
    __PACKAGE__->add_columns(qw/ artistid name /);
    # and this is the pkey
    __PACKAGE__->set_primary_key('artistid');
    
  2. or download this
    my $result_source = $schema->resultset('Artist')->result_source;
    my @list_of_columns_in_pkey = $result_source->primary_columns;
    
  3. or download this
    my $result_source = $schema->source('Artist');
    my @list_of_columns_in_pkey = $result_source->primary_columns;