X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase%2FMicrosoft_SQL_Server.pm;h=3d8302015910f6c37e4f94cfff3fb2e2bea280fc;hb=84f97107323065f3be493552cd70ae9d976a4f80;hp=5e53118b93140645fe8f601092f5af8f2fa1f888;hpb=7624b54e3e9e5b3bdfd43a3808116076e8a2ef3d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm index 5e53118..3d83020 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm @@ -4,28 +4,29 @@ use strict; use warnings; use base qw/ - DBIx::Class::Storage::DBI::Sybase::Base + DBIx::Class::Storage::DBI::Sybase::Common DBIx::Class::Storage::DBI::MSSQL /; use mro 'c3'; sub _rebless { my $self = shift; - my $dbh = $self->_dbh; + my $dbh = $self->_get_dbh; - if (not $self->_placeholders_supported) { + if (not $self->_typeless_placeholders_supported) { bless $self, 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars'; $self->_rebless; } +} -# LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is -# huge on some versions of SQL server and can cause memory problems, so we -# fix it up here. - my $text_size = eval { $self->_dbi_connect_info->[-1]->{LongReadLen} } || - 32768; # the DBD::Sybase default +sub _init { + my $self = shift; - $dbh->do("set textsize $text_size"); + # LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is + # huge on some versions of SQL server and can cause memory problems, so we + # fix it up here (see Sybase/Common.pm) + $self->set_textsize; } 1;