Commit | Line | Data |
---|---|---|
b8e1e21f | 1 | package DBIx::Class::PK::Auto; |
2 | ||
773e3015 | 3 | #use base qw/DBIx::Class::PK/; |
4 | use base qw/DBIx::Class/; | |
b8e1e21f | 5 | use strict; |
6 | use warnings; | |
7 | ||
89170201 | 8 | 1; |
9 | ||
a2bd3796 | 10 | __END__ |
11 | ||
75d07914 | 12 | =head1 NAME |
34d52be2 | 13 | |
eb49d4e3 | 14 | DBIx::Class::PK::Auto - Automatic primary key class |
34d52be2 | 15 | |
16 | =head1 SYNOPSIS | |
17 | ||
d88ecca6 | 18 | use base 'DBIx::Class::Core'; |
77254782 | 19 | __PACKAGE__->set_primary_key('id'); |
6718c5f0 | 20 | |
34d52be2 | 21 | =head1 DESCRIPTION |
22 | ||
eb49d4e3 | 23 | This class overrides the insert method to get automatically incremented primary |
24 | keys. | |
34d52be2 | 25 | |
9ea86671 | 26 | PK::Auto is now part of Core. |
f4ccda68 | 27 | |
e2441ae6 | 28 | See L<DBIx::Class::Manual::Component> for details of component interactions. |
7624b19f | 29 | |
c8f4b52b | 30 | =head1 LOGIC |
31 | ||
eb49d4e3 | 32 | C<PK::Auto> does this by letting the database assign the primary key field and |
33 | fetching the assigned value afterwards. | |
c8f4b52b | 34 | |
34d52be2 | 35 | =head1 METHODS |
36 | ||
130c6439 | 37 | =head2 insert |
34d52be2 | 38 | |
9ea86671 | 39 | The code that was handled here is now in Row for efficiency. |
b8e1e21f | 40 | |
130c6439 | 41 | =head2 sequence |
97cc0025 | 42 | |
89170201 | 43 | The code that was handled here is now in ResultSource, and is being proxied to |
44 | Row as well. | |
34d52be2 | 45 | |
a2bd3796 | 46 | =head1 FURTHER QUESTIONS? |
34d52be2 | 47 | |
a2bd3796 | 48 | Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>. |
34d52be2 | 49 | |
a2bd3796 | 50 | =head1 COPYRIGHT AND LICENSE |
34d52be2 | 51 | |
a2bd3796 | 52 | This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE> |
53 | by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can | |
54 | redistribute it and/or modify it under the same terms as the | |
55 | L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>. |