Fix documentation of search_related
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / MSSQL.pm
CommitLineData
75d07914 1package DBIx::Class::Storage::DBI::MSSQL;
3885cff6 2
75d07914 3use strict;
4use warnings;
3885cff6 5
6use base qw/DBIx::Class::Storage::DBI::Sybase/;
7
75d07914 8sub last_insert_id {
9 my( $id ) = $_[0]->_dbh->selectrow_array('SELECT @@IDENTITY' );
10 return $id;
11}
ed8de058 12
13sub build_datetime_parser {
14 my $self = shift;
15 my $type = "DateTime::Format::Strptime";
16 eval "use ${type}";
17 $self->throw_exception("Couldn't load ${type}: $@") if $@;
18 return $type->new( pattern => '%m/%d/%Y %H:%M:%S' );
19}
3885cff6 20
75d07914 211;
3885cff6 22
75d07914 23=head1 NAME
3885cff6 24
25DBIx::Class::Storage::DBI::MSSQL - Storage::DBI subclass for MSSQL
26
75d07914 27=head1 SYNOPSIS
3885cff6 28
29This subclass supports MSSQL. As MSSQL is usually used via a
30differently-named DBD such as L<DBD::Sybase>, it does not get
31autodetected by DBD-type like the other drivers, and you will need to
32specify this storage driver manually, as in:
33
34 $schema->storage_type('::DBI::MSSQL');
35 $schema->connect_info('dbi:Sybase:....', ...);
36
75d07914 37=head1 AUTHORS
3885cff6 38
75d07914 39Brian Cassidy <bricas@cpan.org>
3885cff6 40
75d07914 41=head1 LICENSE
3885cff6 42
75d07914 43You may distribute this code under the same terms as Perl itself.
3885cff6 44
75d07914 45=cut