update Changes
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / Microsoft_SQL_Server.pm
CommitLineData
98464041 1package DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server;
2
3use strict;
4use warnings;
2ad62d97 5
528accab 6use base qw/
eabab5d0 7 DBIx::Class::Storage::DBI::Sybase::Base
8c44d0f2 8 DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server
f0070d01 9 DBIx::Class::Storage::DBI::NoBindVars
528accab 10/;
2ad62d97 11use mro 'c3';
98464041 12
9b3dabe0 13sub _rebless {
14 my $self = shift;
15 $self->disable_sth_caching(1);
b5453fbb 16
17# LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is
18# huge on some versions of SQL server and can cause memory problems, so we
19# fix it up here.
e97a6ee2 20 $self->set_textsize(
21 eval { $self->_dbi_connect_info->[-1]->{LongReadLen} } ||
22 32768 # the DBD::Sybase default
23 );
9b3dabe0 24}
25
98464041 261;
27
28=head1 NAME
29
30DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server - Storage::DBI subclass for MSSQL via
31DBD::Sybase
32
33=head1 SYNOPSIS
34
5608593e 35This subclass supports MSSQL server connections via L<DBD::Sybase>.
98464041 36
d4483998 37=head1 CAVEATS
98464041 38
d4483998 39This storage driver uses L<DBIx::Class::Storage::DBI::NoBindVars> as a base.
40This means that bind variables will be interpolated (properly quoted of course)
41into the SQL query itself, without using bind placeholders.
42
43More importantly this means that caching of prepared statements is explicitly
44disabled, as the interpolation renders it useless.
98464041 45
7e8cecc1 46The actual driver code for MSSQL is in
47L<DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server>.
48
98464041 49=head1 AUTHORS
50
b7505130 51See L<DBIx::Class/CONTRIBUTORS>.
98464041 52
53=head1 LICENSE
54
55You may distribute this code under the same terms as Perl itself.
56
57=cut