523ec27035f3f31ac2011003e6fb15fdeba3014f
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / PK / Auto.pm
1 package DBIx::Class::PK::Auto;
2
3 #use base qw/DBIx::Class::PK/;
4 use base qw/DBIx::Class/;
5 use strict;
6 use warnings;
7
8 1;
9
10 =head1 NAME
11
12 DBIx::Class::PK::Auto - Automatic primary key class
13
14 =head1 SYNOPSIS
15
16 use base 'DBIx::Class::Core';
17 __PACKAGE__->set_primary_key('id');
18
19 =head1 DESCRIPTION
20
21 This class overrides the insert method to get automatically incremented primary
22 keys.
23
24 PK::Auto is now part of Core.
25
26 See L<DBIx::Class::Manual::Component> for details of component interactions.
27
28 =head1 LOGIC
29
30 C<PK::Auto> does this by letting the database assign the primary key field and
31 fetching the assigned value afterwards.
32
33 =head1 METHODS
34
35 =head2 insert
36
37 The code that was handled here is now in Row for efficiency.
38
39 =head2 sequence
40
41 The code that was handled here is now in ResultSource, and is being proxied to
42 Row as well.
43
44 =head1 AUTHORS
45
46 Matt S. Trout <mst@shadowcatsystems.co.uk>
47
48 =head1 LICENSE
49
50 You may distribute this code under the same terms as Perl itself.
51
52 =cut