blib/lib/AutoSQL/DBSQL/ObjectAdaptor/OnlyFetch.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
_only_fetch_by_where
2.0
_only_fetch_array_slot_by_where
2.0
BEGIN
2.0
CRAP 2.0
1 package AutoSQL::DBSQL::ObjectAdaptor::OnlyFetch;
2 use strict;
3 use AutoSQL::DBSQL::ObjectAdaptor::Fetch;
4 our @ISA=qw(AutoSQL::DBSQL::ObjectAdaptor::Fetch);
5  
6 sub _only_fetch_by_where {
7 my ($self, $slot, $where, $values)=@_;
8 my $sql = "SELECT $slot FROM ". $self->_table_name ." WHERE $where";
9 print STDERR ref($self) ."::_only_fetch_by_where $sql\n";
10 my $sth=$self->prepare($sql);
11 $sth->execute(@$values);
12 my @rets;
13 while(my @array = $sth->fetchrow_array){
14 push @rets, $array[0];
15 }
16 return @rets;
17 }
18  
19 sub _only_fetch_array_slot_by_where {
20 ;
21 }
22  
23  
24 1;