Extract couple more stateless functions from DBIHacks (like 497d0451)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ADO / Microsoft_SQL_Server / Cursor.pm
index 1ada243..525526b 100644 (file)
@@ -2,9 +2,12 @@ package DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server::Cursor;
 
 use strict;
 use warnings;
+
 use base 'DBIx::Class::Storage::DBI::Cursor';
 use mro 'c3';
+
 use DBIx::Class::Storage::DBI::ADO::CursorUtils qw/_normalize_guids _strip_trailing_binary_nulls/;
+use DBIx::Class::ResultSource::FromSpec::Util 'fromspec_columns_info';
 use namespace::clean;
 
 =head1 NAME
@@ -42,7 +45,7 @@ sub next {
 
   my @row = $self->next::method(@_);
 
-  $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]);
+  $self->{_colinfos} ||= fromspec_columns_info($self->args->[0]);
 
   _normalize_guids(
     $self->args->[1],
@@ -66,7 +69,7 @@ sub all {
 
   my @rows = $self->next::method(@_);
 
-  $self->{_colinfos} ||= $self->storage->_resolve_column_info($self->args->[0]);
+  $self->{_colinfos} ||= fromspec_columns_info($self->args->[0]);
 
   for (@rows) {
     _normalize_guids(
@@ -87,16 +90,19 @@ sub all {
   return @rows;
 }
 
-1;
-
-=head1 AUTHOR
+=head1 FURTHER QUESTIONS?
 
-See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
 
-=head1 LICENSE
+=head1 COPYRIGHT AND LICENSE
 
-You may distribute this code under the same terms as Perl itself.
+This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
+by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
+redistribute it and/or modify it under the same terms as the
+L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
 
 =cut
 
+1;
+
 # vim:sts=2 sw=2: