Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

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

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


NAME

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


SYNOPSIS

__PACKAGE__->load_components(qw/Core/); __PACKAGE__->set_primary_key('id');


DESCRIPTION

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


  __PACKAGE__->load_components(qw/Core/);

PK::Auto is now part of Core.

See the DBIx::Class::Manual::Component manpage 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.


AUTHORS

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


LICENSE

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

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy