Commit | Line | Data |
---|---|---|
75d07914 | 1 | package DBIx::Class::Storage::DBI::MSSQL; |
3885cff6 | 2 | |
75d07914 | 3 | use strict; |
4 | use warnings; | |
3885cff6 | 5 | |
81092e2d | 6 | use base qw/DBIx::Class::Storage::DBI/; |
3885cff6 | 7 | |
75d07914 | 8 | sub last_insert_id { |
9 | my( $id ) = $_[0]->_dbh->selectrow_array('SELECT @@IDENTITY' ); | |
10 | return $id; | |
11 | } | |
ed8de058 | 12 | |
13 | sub 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 | 21 | 1; |
3885cff6 | 22 | |
75d07914 | 23 | =head1 NAME |
3885cff6 | 24 | |
25 | DBIx::Class::Storage::DBI::MSSQL - Storage::DBI subclass for MSSQL | |
26 | ||
75d07914 | 27 | =head1 SYNOPSIS |
3885cff6 | 28 | |
81092e2d | 29 | This subclass supports MSSQL, and can in theory be used directly |
30 | via the C<storage_type> mechanism: | |
3885cff6 | 31 | |
32 | $schema->storage_type('::DBI::MSSQL'); | |
81092e2d | 33 | $schema->connect_info('dbi:....', ...); |
34 | ||
35 | However, as there is no L<DBD::MSSQL>, you will probably want to use | |
36 | one of the other DBD-specific MSSQL classes, such as | |
37 | L<DBIx::Class::Storage::DBI::Sybase::MSSQL>. These classes will | |
38 | merge this class with a DBD-specific class to obtain fully | |
39 | correct behavior for your scenario. | |
3885cff6 | 40 | |
75d07914 | 41 | =head1 AUTHORS |
3885cff6 | 42 | |
75d07914 | 43 | Brian Cassidy <bricas@cpan.org> |
3885cff6 | 44 | |
75d07914 | 45 | =head1 LICENSE |
3885cff6 | 46 | |
75d07914 | 47 | You may distribute this code under the same terms as Perl itself. |
3885cff6 | 48 | |
75d07914 | 49 | =cut |