DBIx::Class::PK::Auto - Automatic primary key class


DBIx-Class documentation  | view source Contained in the DBIx-Class distribution.

Index


NAME

Top

DBIx::Class::PK::Auto - Automatic primary key class

SYNOPSIS

Top

use base 'DBIx::Class::Core'; __PACKAGE__->set_primary_key('id');

DESCRIPTION

Top

This class overrides the insert method to get automatically incremented primary keys.

PK::Auto is now part of Core.

See DBIx::Class::Manual::Component for details of component interactions.

LOGIC

Top

PK::Auto does this by letting the database assign the primary key field and fetching the assigned value afterwards.

METHODS

Top

insert

The code that was handled here is now in Row for efficiency.

sequence

The code that was handled here is now in ResultSource, and is being proxied to Row as well.

AUTHORS

Top

Matt S. Trout <mst@shadowcatsystems.co.uk>

LICENSE

Top

You may distribute this code under the same terms as Perl itself.


DBIx-Class documentation  | view source Contained in the DBIx-Class distribution.