« blib/lib/AutoSQL/DBSQL/ObjectAdaptor/General.pm
↑ Summary
blib/lib/AutoSQL/DBSQL/ObjectAdaptor/Remove.pm »
| 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; |