X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO%2FMicrosoft_SQL_Server.pm;h=ac42a1eebad8b5f8f7e1484da8aad60b1fb756d9;hb=12a184d0a0c1868708e43aaabefe08f9e7ac9ec4;hp=09cbee649df557d47e5eca2b2bfb833b1e4415d7;hpb=4a0eed52f392b2e135385d0c06b06160200f3772;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm index 09cbee6..ac42a1e 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server.pm @@ -60,7 +60,7 @@ size of the bind sizes in the first prepare call: L -The C workaround is used (see L) with the +The C workaround is used (see L) with the approximate maximum size of the data_type of the bound column, or 8000 (maximum VARCHAR size) if the data_type is not available. @@ -182,16 +182,18 @@ sub _dbi_attrs_for_bind { my $attrs = $self->next::method(@_); - foreach my $attr (@$attrs) { - $attr->{ado_size} ||= 8000 if $attr; - } + # The next::method above caches the returned hashrefs in a _dbh related + # structure. It is safe for us to modify it in this manner, as the default + # does not really change (albeit the entire logic is insane and is pending + # a datatype-objects rewrite) + $_ and $_->{ado_size} ||= 8000 for @$attrs; return $attrs; } -# Can't edit all the binds in _dbi_attrs_for_bind for insert_bulk, so we take +# Can't edit all the binds in _dbi_attrs_for_bind for _insert_bulk, so we take # care of those GUIDs here. -sub insert_bulk { +sub _insert_bulk { my $self = shift; my ($source, $cols, $data) = @_; @@ -436,15 +438,19 @@ sub format_datetime { return $datetime_parser->format_datetime(shift); } -1; - -=head1 AUTHOR +=head1 FURTHER QUESTIONS? -See L and L. +Check the list of L. -=head1 LICENSE +=head1 COPYRIGHT AND LICENSE -You may distribute this code under the same terms as Perl itself. +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. =cut + +1; + # vim:sts=2 sw=2: