1 package # hide from PAUSE
2 DBIx::Class::Storage::DBI::Cursor;
4 use base qw/DBIx::Class::Cursor/;
10 my ($class, $storage, $args, $attrs) = @_;
11 #use Data::Dumper; warn Dumper(@_);
12 $class = ref $class if ref $class;
18 return bless ($new, $class);
23 if ($self->{attrs}{rows} && $self->{pos} >= $self->{attrs}{rows}) {
24 $self->{sth}->finish if $self->{sth}->{Active};
28 return if $self->{done};
29 unless ($self->{sth}) {
30 $self->{sth} = ($self->{storage}->_select(@{$self->{args}}))[1];
31 if ($self->{attrs}{software_limit}) {
32 if (my $offset = $self->{attrs}{offset}) {
33 $self->{sth}->fetch for 1 .. $offset;
37 my @row = $self->{sth}->fetchrow_array;
49 return $self->SUPER::all if $self->{attrs}{rows};
50 $self->{sth}->finish if $self->{sth}->{Active};
52 my ($rv, $sth) = $self->{storage}->_select(@{$self->{args}});
53 return @{$sth->fetchall_arrayref};
58 $self->{sth}->finish if $self->{sth}->{Active};
67 $self->{sth}->finish if $self->{sth}->{Active};