Commit | Line | Data |
7624b19f |
1 | package DBIx::Class::PK::Auto::MySQL; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use base qw/DBIx::Class/; |
7 | |
8 | __PACKAGE__->load_components(qw/PK::Auto/); |
9 | |
10 | sub last_insert_id { |
11 | return $_[0]->storage->dbh->{mysql_insertid}; |
12 | } |
13 | |
14 | 1; |
15 | |
16 | =head1 NAME |
17 | |
18 | DBIx::Class::PK::Auto::MySQL - Automatic Primary Key class for MySQL |
19 | |
20 | =head1 SYNOPSIS |
21 | |
22 | =head1 DESCRIPTION |
23 | |
24 | This class implements autoincrements for MySQL. |
25 | |
26 | =head1 AUTHORS |
27 | |
28 | Matt S. Trout <perl-stuff@trout.me.uk> |
29 | |
30 | =head1 LICENSE |
31 | |
32 | You may distribute this code under the same terms as Perl itself. |
33 | |
34 | =cut |
35 | |