Commit | Line | Data |
---|---|---|
98464041 | 1 | package DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
2ad62d97 | 5 | |
528accab | 6 | use base qw/ |
2f92e90b | 7 | DBIx::Class::Storage::DBI::Sybase::Common |
5a77aa8b | 8 | DBIx::Class::Storage::DBI::MSSQL |
528accab | 9 | /; |
2ad62d97 | 10 | use mro 'c3'; |
98464041 | 11 | |
322b7a6b | 12 | sub new { |
13 | my $self = shift->next::method(@_); | |
14 | $self->_rebless; | |
15 | return $self; | |
16 | } | |
17 | ||
9b3dabe0 | 18 | sub _rebless { |
19 | my $self = shift; | |
9ae966b9 | 20 | my $dbh = $self->_get_dbh; |
7379eb67 | 21 | |
e33b954c | 22 | if (not $self->_typeless_placeholders_supported) { |
7379eb67 | 23 | bless $self, |
24 | 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars'; | |
25 | $self->_rebless; | |
26 | } | |
b5453fbb | 27 | |
28 | # LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is | |
29 | # huge on some versions of SQL server and can cause memory problems, so we | |
322b7a6b | 30 | # fix it up here (see Sybase/Common.pm .) |
31 | $self->set_textsize; | |
9b3dabe0 | 32 | } |
33 | ||
98464041 | 34 | 1; |
35 | ||
36 | =head1 NAME | |
37 | ||
5a77aa8b | 38 | DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server - Support for Microsoft |
39 | SQL Server via DBD::Sybase | |
98464041 | 40 | |
41 | =head1 SYNOPSIS | |
42 | ||
5608593e | 43 | This subclass supports MSSQL server connections via L<DBD::Sybase>. |
98464041 | 44 | |
7379eb67 | 45 | =head1 DESCRIPTION |
d4483998 | 46 | |
7379eb67 | 47 | This driver tries to determine whether your version of L<DBD::Sybase> and |
48 | supporting libraries (usually FreeTDS) support using placeholders, if not the | |
49 | storage will be reblessed to | |
50 | L<DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars>. | |
98464041 | 51 | |
7379eb67 | 52 | The MSSQL specific functionality is provided by |
53 | L<DBIx::Class::Storage::DBI::MSSQL>. | |
7e8cecc1 | 54 | |
5a77aa8b | 55 | =head1 AUTHOR |
98464041 | 56 | |
b7505130 | 57 | See L<DBIx::Class/CONTRIBUTORS>. |
98464041 | 58 | |
59 | =head1 LICENSE | |
60 | ||
61 | You may distribute this code under the same terms as Perl itself. | |
62 | ||
63 | =cut |