X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO%2FMicrosoft_SQL_Server%2FCursor.pm;h=6253ee6a595c14a96be9ad31f6a7748401d6a341;hb=a2bd379666d729133d65c85dc775627937084b18;hp=d42114590b9afa134ac5fe7df4a8cf227f711c1f;hpb=2edf33525bc7be0824693925c528791d84db98aa;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm index d421145..6253ee6 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO/Microsoft_SQL_Server/Cursor.pm @@ -37,52 +37,69 @@ for the inner cursor class. =cut -sub _dbh_next { - my ($storage, $dbh, $self) = @_; +sub next { + my $self = shift; - my $next = $self->next::can; + my @row = $self->next::method(@_); - my @row = $next->(@_); + $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]); - my $col_infos = $storage->_resolve_column_info($self->args->[0]); + _normalize_guids( + $self->args->[1], + $self->{_colinfos}, + \@row, + $self->storage + ); - my $select = $self->args->[1]; - - _normalize_guids($select, $col_infos, \@row, $storage); - _strip_trailing_binary_nulls($select, $col_infos, \@row); + _strip_trailing_binary_nulls( + $self->args->[1], + $self->{_colinfos}, + \@row, + $self->storage + ); return @row; } -sub _dbh_all { - my ($storage, $dbh, $self) = @_; - - my $next = $self->next::can; +sub all { + my $self = shift; - my @rows = $next->(@_); + my @rows = $self->next::method(@_); - my $col_infos = $storage->_resolve_column_info($self->args->[0]); - - my $select = $self->args->[1]; + $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]); for (@rows) { - _normalize_guids($select, $col_infos, $_, $storage); - _strip_trailing_binary_nulls($select, $col_infos, $_); + _normalize_guids( + $self->args->[1], + $self->{_colinfos}, + $_, + $self->storage + ); + + _strip_trailing_binary_nulls( + $self->args->[1], + $self->{_colinfos}, + $_, + $self->storage + ); } return @rows; } -1; +=head1 FURTHER QUESTIONS? -=head1 AUTHOR +Check the list of L. -See L and L. +=head1 COPYRIGHT AND LICENSE -=head1 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: