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/ |
eabab5d0 |
7 | DBIx::Class::Storage::DBI::Sybase::Base |
5a77aa8b |
8 | DBIx::Class::Storage::DBI::MSSQL |
f0070d01 |
9 | DBIx::Class::Storage::DBI::NoBindVars |
528accab |
10 | /; |
2ad62d97 |
11 | use mro 'c3'; |
98464041 |
12 | |
9b3dabe0 |
13 | sub _rebless { |
14 | my $self = shift; |
7379eb67 |
15 | my $dbh = $self->_dbh; |
16 | |
7624b54e |
17 | if (not $self->_placeholders_supported) { |
7379eb67 |
18 | bless $self, |
19 | 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars'; |
20 | $self->_rebless; |
21 | } |
b5453fbb |
22 | |
23 | # LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is |
24 | # huge on some versions of SQL server and can cause memory problems, so we |
25 | # fix it up here. |
7379eb67 |
26 | my $text_size = eval { $self->_dbi_connect_info->[-1]->{LongReadLen} } || |
27 | 32768; # the DBD::Sybase default |
28 | |
29 | $dbh->do("set textsize $text_size"); |
9b3dabe0 |
30 | } |
31 | |
98464041 |
32 | 1; |
33 | |
34 | =head1 NAME |
35 | |
5a77aa8b |
36 | DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server - Support for Microsoft |
37 | SQL Server via DBD::Sybase |
98464041 |
38 | |
39 | =head1 SYNOPSIS |
40 | |
5608593e |
41 | This subclass supports MSSQL server connections via L<DBD::Sybase>. |
98464041 |
42 | |
7379eb67 |
43 | =head1 DESCRIPTION |
d4483998 |
44 | |
7379eb67 |
45 | This driver tries to determine whether your version of L<DBD::Sybase> and |
46 | supporting libraries (usually FreeTDS) support using placeholders, if not the |
47 | storage will be reblessed to |
48 | L<DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars>. |
98464041 |
49 | |
7379eb67 |
50 | The MSSQL specific functionality is provided by |
51 | L<DBIx::Class::Storage::DBI::MSSQL>. |
7e8cecc1 |
52 | |
5a77aa8b |
53 | =head1 AUTHOR |
98464041 |
54 | |
b7505130 |
55 | See L<DBIx::Class/CONTRIBUTORS>. |
98464041 |
56 | |
57 | =head1 LICENSE |
58 | |
59 | You may distribute this code under the same terms as Perl itself. |
60 | |
61 | =cut |