1 package DBM::Deep::Iterator::DBI;
4 use warnings FATAL => 'all';
6 use base qw( DBM::Deep::Iterator );
11 eval { $self->{sth}->finish; };
21 unless ( exists $self->{sth} ) {
22 $self->{sth} = $self->{engine}->storage->{dbh}->prepare(
23 "SELECT `key` FROM datas WHERE ref_id = ? ORDER BY RAND()",
25 $self->{sth}->execute( $self->{base_offset} );
28 my ($key) = $self->{sth}->fetchrow_array;