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}) {
23 $self->{sth}->finish if $self->{sth}->{Active};
27 return if $self->{done};
28 unless ($self->{sth}) {
29 $self->{sth} = ($self->{storage}->_select(@{$self->{args}}))[1];
30 if ($self->{attrs}{software_limit}) {
31 if (my $offset = $self->{attrs}{offset}) {
32 $self->{sth}->fetch for 1 .. $offset;
36 my @row = $self->{sth}->fetchrow_array;
48 return $self->SUPER::all if $self->{attrs}{rows};
49 $self->{sth}->finish if $self->{sth}->{Active};
51 my ($rv, $sth) = $self->{storage}->_select(@{$self->{args}});
52 return @{$sth->fetchall_arrayref};
57 $self->{sth}->finish if $self->{sth}->{Active};
66 $self->{sth}->finish if $self->{sth}->{Active};