1 package DBIx::Class::Storage::DBI::Cursor;
3 use base qw/DBIx::Class::Cursor/;
9 my ($class, $storage, $args, $attrs) = @_;
10 #use Data::Dumper; warn Dumper(@_);
11 $class = ref $class if ref $class;
17 return bless ($new, $class);
22 if ($self->{attrs}{rows} && $self->{pos} >= $self->{attrs}{rows}) {
26 return if $self->{done};
27 unless ($self->{sth}) {
28 $self->{sth} = ($self->{storage}->_select(@{$self->{args}}))[1];
29 if ($self->{attrs}{software_limit}) {
30 if (my $offset = $self->{attrs}{offset}) {
31 $self->{sth}->fetch for 1 .. $offset;
35 my @row = $self->{sth}->fetchrow_array;
47 return $self->SUPER::all if $self->{attrs}{rows};
48 $self->{sth}->finish if $self->{sth}->{Active};
50 my ($rv, $sth) = $self->{storage}->_select(@{$self->{args}});
51 return @{$sth->fetchall_arrayref};
56 $self->{sth}->finish if $self->{sth}->{Active};
65 $self->{sth}->finish if $self->{sth}->{Active};