NoBindVars + Sybase + MSSQL stuff
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / MSSQL.pm
index a303d25..38653f6 100644 (file)
@@ -1,12 +1,10 @@
 package DBIx::Class::Storage::DBI::MSSQL;
-\r
+
 use strict;
 use warnings;
-\r
-use base qw/DBIx::Class::Storage::DBI/;
-\r
-# __PACKAGE__->load_components(qw/PK::Auto/);
-\r
+
+use base qw/DBIx::Class::Storage::DBI::Sybase/;
+
 sub last_insert_id {
   my( $id ) = $_[0]->_dbh->selectrow_array('SELECT @@IDENTITY' );
   return $id;
@@ -19,29 +17,29 @@ sub build_datetime_parser {
   $self->throw_exception("Couldn't load ${type}: $@") if $@;
   return $type->new( pattern => '%m/%d/%Y %H:%M:%S' );
 }
-\r
+
 1;
-\r
+
 =head1 NAME
-\r
-DBIx::Class::Storage::DBI::MSSQL - Automatic primary key class for MSSQL
-\r
+
+DBIx::Class::Storage::DBI::MSSQL - Storage::DBI subclass for MSSQL
+
 =head1 SYNOPSIS
-\r
-  # In your table classes
-  __PACKAGE__->load_components(qw/PK::Auto Core/);
-  __PACKAGE__->set_primary_key('id');
-\r
-=head1 DESCRIPTION
-\r
-This class implements autoincrements for MSSQL.
-\r
+
+This subclass supports MSSQL.  As MSSQL is usually used via a
+differently-named DBD such as L<DBD::Sybase>, it does not get
+autodetected by DBD-type like the other drivers, and you will need to
+specify this storage driver manually, as in:
+
+  $schema->storage_type('::DBI::MSSQL');
+  $schema->connect_info('dbi:Sybase:....', ...);
+
 =head1 AUTHORS
-\r
+
 Brian Cassidy <bricas@cpan.org>
-\r
+
 =head1 LICENSE
-\r
+
 You may distribute this code under the same terms as Perl itself.
-\r
+
 =cut