Think about Loose Coupling | |
PerlMonks |
retrieving primary key from a DBIx::Class packageby tomgracey (Scribe) |
on Apr 24, 2013 at 10:23 UTC ( [id://1030339]=perlquestion: print w/replies, xml ) | Need Help?? |
tomgracey has asked for the wisdom of the Perl Monks concerning the following question: Dear Monks I am wondering if there is a way (method?) to retrieve a table's primary key via a DBIx::Class table object. For example, ideally I would like to be able to do something like my $pk = $schema->resultset('MyPackage')->primary_key; or perhaps my $pk =Schema::Result::MyPackage->primary_key; ... or something else? I'm trying to create a method that outputs a certain data format when any general table name is input. (And, no, I can't really say I understand DBIx::Class terribly well!) Your help very much appreciated!
Back to
Seekers of Perl Wisdom
|
|