Alexander Hartmaier > DBIx-Class > DBIx::Class::PK::Auto

Download:
DBIx-Class-0.08209.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  12
Open  18
Stalled  11
View/Report Bugs
Source   Latest Release: DBIx-Class-0.082810

NAME ^

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

SYNOPSIS ^

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

DESCRIPTION ^

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 ^

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

METHODS ^

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.

AUTHOR AND CONTRIBUTORS ^

See AUTHOR and CONTRIBUTORS in DBIx::Class

LICENSE ^

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

syntax highlighting: