File Coverage

blib/lib/DBIx/Class/PK/Auto.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package DBIx::Class::PK::Auto;
2              
3             #use base qw/DBIx::Class::PK/;
4 379     379   206551 use base qw/DBIx::Class/;
  379         1293  
  379         43008  
5 379     379   2813 use strict;
  379         1085  
  379         8515  
6 379     379   2182 use warnings;
  379         1169  
  379         14258  
7              
8             1;
9              
10             __END__
11              
12             =head1 NAME
13              
14             DBIx::Class::PK::Auto - Automatic primary key class
15              
16             =head1 SYNOPSIS
17              
18             use base 'DBIx::Class::Core';
19             __PACKAGE__->set_primary_key('id');
20              
21             =head1 DESCRIPTION
22              
23             This class overrides the insert method to get automatically incremented primary
24             keys.
25              
26             PK::Auto is now part of Core.
27              
28             See L<DBIx::Class::Manual::Component> for details of component interactions.
29              
30             =head1 LOGIC
31              
32             C<PK::Auto> does this by letting the database assign the primary key field and
33             fetching the assigned value afterwards.
34              
35             =head1 METHODS
36              
37             =head2 insert
38              
39             The code that was handled here is now in Row for efficiency.
40              
41             =head2 sequence
42              
43             The code that was handled here is now in ResultSource, and is being proxied to
44             Row as well.
45              
46             =head1 FURTHER QUESTIONS?
47              
48             Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
49              
50             =head1 COPYRIGHT AND LICENSE
51              
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>.