<<

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

Manually define the correct sequence for your table, to avoid the overhead associated with looking up the sequence automatically.

INHERITED METHODS

DBIx::Class

MODIFY_CODE_ATTRIBUTES, component_base_class, mk_classaccessor, mk_classdata

DBIx::Class::Componentised

inject_base

Class::C3::Componentised

ensure_class_found, ensure_class_loaded, load_components, load_optional_class, load_optional_components, load_own_components

Class::Accessor::Grouped

get_component_class, get_inherited, get_simple, get_super_paths, make_group_accessor, make_group_ro_accessor, make_group_wo_accessor, mk_group_accessors, mk_group_ro_accessors, mk_group_wo_accessors, set_component_class, set_inherited, set_simple

INHERITED METHODS

DBIx::Class

MODIFY_CODE_ATTRIBUTES, component_base_class, mk_classaccessor, mk_classdata

DBIx::Class::Componentised

inject_base

Class::C3::Componentised

ensure_class_found, ensure_class_loaded, load_components, load_optional_class, load_optional_components, load_own_components

Class::Accessor::Grouped

get_component_class, get_inherited, get_simple, get_super_paths, make_group_accessor, make_group_ro_accessor, make_group_wo_accessor, mk_group_accessors, mk_group_ro_accessors, mk_group_wo_accessors, set_component_class, set_inherited, set_simple

AUTHORS

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

LICENSE

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

<<