Cleanup and add basic docs for PK::Auto::DB2
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / PK / Auto / SQLite.pm
1 package DBIx::Class::PK::Auto::SQLite;
2
3 use strict;
4 use warnings;
5
6 use base qw/DBIx::Class/;
7
8 __PACKAGE__->load_components(qw/PK::Auto/);
9
10 sub last_insert_id {
11   return $_[0]->result_source->storage->dbh->func('last_insert_rowid');
12 }
13
14 1;
15
16 =head1 NAME 
17
18 DBIx::Class::PK::Auto::SQLite - Automatic primary key class for SQLite
19
20 =head1 SYNOPSIS
21
22   # In your table classes
23   __PACKAGE__->load_components(qw/PK::Auto::SQLite Core/);
24   __PACKAGE__->set_primary_key('id');
25
26 =head1 DESCRIPTION
27
28 This class implements autoincrements for SQLite.
29
30 =head1 AUTHORS
31
32 Matt S. Trout <mst@shadowcatsystems.co.uk>
33
34 =head1 LICENSE
35
36 You may distribute this code under the same terms as Perl itself.
37
38 =cut