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=d867eedaa703200d7f0bc329836e99b6bd22bc39;hp=7e1981693bede18291b260ad8c65ce592186d454;hpb=1f4263ebe497f0a4a7dbde8850a8d1736946740d;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 7e19816..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,29 +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 - DBIx::Class::Storage::DBI::NoBindVars /; 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;