X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FPK%2FAuto%2FMSSQL.pm;h=ce0ee2cc3c4101267f0373e7665d4da50587f9e5;hb=0c11ad0ee5c8407f6b87d6e15c62a1b445076dc0;hp=4619998c9dacf0a8b4c54dc2ca7861756ab5f6c2;hpb=66d9ef6bf10ccbdc9391e81e5b1ad1b615fb67f7;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/PK/Auto/MSSQL.pm b/lib/DBIx/Class/PK/Auto/MSSQL.pm index 4619998..ce0ee2c 100644 --- a/lib/DBIx/Class/PK/Auto/MSSQL.pm +++ b/lib/DBIx/Class/PK/Auto/MSSQL.pm @@ -1,40 +1,29 @@ -package DBIx::Class::PK::Auto::MSSQL; - -use strict; -use warnings; - -use base qw/DBIx::Class/; - -__PACKAGE__->load_components(qw/PK::Auto/); - -sub last_insert_id { - my( $id ) = $_[0]->result_source->storage->dbh->selectrow_array( - 'SELECT @@IDENTITY' ); - return $id; -} - -1; - -=head1 NAME - -DBIx::Class::PK::Auto::MSSQL - Automatic Primary Key class for MSSQL - -=head1 SYNOPSIS - - # In your table classes - __PACKAGE__->load_components(qw/PK::Auto::MSSQL Core/); - __PACKAGE__->set_primary_key('id'); - -=head1 DESCRIPTION - -This class implements autoincrements for MSSQL. - -=head1 AUTHORS - -Brian Cassidy - -=head1 LICENSE - -You may distribute this code under the same terms as Perl itself. - -=cut +package # hide package from pause + DBIx::Class::PK::Auto::MSSQL; + +use strict; +use warnings; + +use base qw/DBIx::Class/; + +__PACKAGE__->load_components(qw/PK::Auto/); + +1; + +=head1 NAME + +DBIx::Class::PK::Auto::MSSQL - (DEPRECATED) Automatic primary key class for MSSQL + +=head1 SYNOPSIS + +Just load PK::Auto instead; auto-inc is now handled by Storage. + +=head1 AUTHOR AND CONTRIBUTORS + +See L and L in DBIx::Class + +=head1 LICENSE + +You may distribute this code under the same terms as Perl itself. + +=cut