1 package DBIx::Class::PK::Auto::MySQL;
6 use base qw/DBIx::Class/;
8 __PACKAGE__->load_components(qw/PK::Auto/);
11 return $_[0]->result_source->storage->dbh->{mysql_insertid};
18 DBIx::Class::PK::Auto::MySQL - Automatic Primary Key class for MySQL
22 # In your table classes
23 __PACKAGE__->load_components(qw/PK::Auto::MySQL Core/);
24 __PACKAGE__->set_primary_key('id');
28 This class implements autoincrements for MySQL.
32 Matt S. Trout <mst@shadowcatsystems.co.uk>
36 You may distribute this code under the same terms as Perl itself.